steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
+ - uses: docker-practice/actions-setup-docker@master
+ - name: Login to GitHub Container Registry
+ uses: docker/login-action@v1
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Bazelisk
# You may pin to the exact commit or the version.
# uses: bazelbuild/setup-bazelisk@2351cf5a7584ce72638fbce7c22e5128a5fcd5b2
bazel-bin*/package_tar.tar.gz
- name: Setup docker
- - uses: docker-practice/actions-setup-docker@master
- - name: Login to GitHub Container Registry
- uses: docker/login-action@v1
- with:
- registry: ghcr.io
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish docker images
shell: bash
run: |
images = {
"ghcr.io/discordnova/nova/novactl:latest": "//novactl:image",
+ "ghcr.io/discordnova/nova/gateway:latest": "//gateway:image",
+ "ghcr.io/discordnova/nova/ratelimiter:latest": "//ratelimiter:image",
+ "ghcr.io/discordnova/nova/webhook:latest": "//webhook:image",
}
)
load("@io_bazel_rules_docker//toolchains/docker:toolchain.bzl", "toolchain_configure")
load("@io_bazel_rules_docker//repositories:repositories.bzl", "repositories")
load("@io_bazel_rules_docker//repositories:deps.bzl", "deps")
-load("@io_bazel_rules_docker//container:container.bzl", "container_pull")
load(
"@io_bazel_rules_docker//go:image.bzl",
_go_image_repos = "repositories",
)
+load(
+ "@io_bazel_rules_docker//rust:image.bzl",
+ _rust_image_repos = "repositories",
+)
+
def load_docker():
+ """
+ Loads all the docker credentials and pull the needed images
+ """
toolchain_configure(
name = "docker_config"
)
repositories()
deps()
- _go_image_repos()
\ No newline at end of file
+ _go_image_repos()
+ _rust_image_repos()
\ No newline at end of file
load("@rules_rust//rust:rust.bzl", "rust_binary")
load("//cargo:crates.bzl", "all_crate_deps", "crate_deps")
+load("@io_bazel_rules_docker//rust:image.bzl", "rust_image")
exports_files(["Cargo.toml"])
deps = all_crate_deps(),
visibility = ["//visibility:public"],
)
+
+rust_image(
+ name = "image",
+ srcs = glob(["src/**/*.rs"]),
+ proc_macro_deps = crate_deps(["serde_repr"]),
+ deps = all_crate_deps(),
+ visibility = ["//visibility:public"],
+)
\ No newline at end of file
load("@rules_rust//rust:rust.bzl", "rust_binary")
load("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
load("//cargo:crates.bzl", "all_crate_deps", "crate_deps")
+load("@io_bazel_rules_docker//rust:image.bzl", "rust_image")
exports_files(["Cargo.toml"])
deps = all_crate_deps() + [":build_script"],
visibility = ["//visibility:public"],
)
+
+rust_image(
+ name = "image",
+ srcs = ["src/main.rs"],
+ deps = all_crate_deps() + [":build_script"],
+ visibility = ["//visibility:public"],
+)
\ No newline at end of file
+++ /dev/null
-exports_files(["create_universe_defaults.bzl"])
\ No newline at end of file
+++ /dev/null
-"""A helper module defining generated information about crate_universe dependencies"""
-
-# This global should match the current release of `crate_unvierse`.
-DEFAULT_URL_TEMPLATE = "https://github.com/bazelbuild/rules_rust/releases/download/crate_universe-12/crate_universe_resolver-{host_triple}{extension}"
-
-# Note that if any additional platforms are added here, the pipeline defined
-# by `create_universe.yaml` should also be updated
-DEFAULT_SHA256_CHECKSUMS = {
- "aarch64-apple-darwin": "c6017cd8a4fee0f1796a8db184e9d64445dd340b7f48a65130d7ee61b97051b4",
- "aarch64-unknown-linux-gnu": "d0a310b03b8147e234e44f6a93e8478c260a7c330e5b35515336e7dd67150f35",
- "x86_64-apple-darwin": "762f1c77b3cf1de8e84d7471442af1314157efd90720c7e1f2fff68556830ee2",
- "x86_64-pc-windows-gnu": "8fa9a00812f3e2f6ac2678e3bce2d8415f3dc8ef926b590d4f855cc696af7c8d",
- "x86_64-unknown-linux-gnu": "aebf51af6a3dd33fdac463b35b0c3f4c47ab93e052099199673289e2025e5824",
-}
\ No newline at end of file
load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_test")
-load("//cargo:crates.bzl", "all_crate_deps", "crate_deps")
+load("//cargo:crates.bzl", "all_crate_deps")
+load("@io_bazel_rules_docker//rust:image.bzl", "rust_image")
exports_files(["Cargo.toml"])
name = "webhook_test",
crate = ":webhook",
deps = all_crate_deps(),
+)
+
+rust_image(
+ name = "image",
+ srcs = glob(["src/**"]),
+ deps = all_crate_deps(),
+ visibility = ["//visibility:public"],
)
\ No newline at end of file