mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
ci: add devcontainer publishing
This commit is contained in:
parent
afbb5b8269
commit
d5fd11b413
3 changed files with 34 additions and 0 deletions
10
.devcontainer/BUILD.bazel
Normal file
10
.devcontainer/BUILD.bazel
Normal file
|
@ -0,0 +1,10 @@
|
|||
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
||||
|
||||
container_push(
|
||||
name = "publish-dev-container",
|
||||
format = "Docker",
|
||||
image = "@dev-container//image:dockerfile_image.tar",
|
||||
registry = "docker.pkg.github.com",
|
||||
repository = "roleypoly/roleypoly/dev-container",
|
||||
tag = "{STABLE_GIT_BRANCH}",
|
||||
)
|
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -40,3 +40,11 @@ jobs:
|
|||
xargs -l1 "${GITHUB_WORKSPACE}/bin/bazel" run \
|
||||
--stamp \
|
||||
--workspace_status_command hack/workspace_status.sh
|
||||
|
||||
- name: Publish Dev Container Image
|
||||
when: github.ref == refs/heads/main
|
||||
run: |
|
||||
"${GITHUB_WORKSPACE}/bin/bazel" run \
|
||||
--stamp \
|
||||
--workspace_status_command hack/workspace_status.sh\
|
||||
//.devcontainer:publish-dev-container
|
||||
|
|
16
WORKSPACE
16
WORKSPACE
|
@ -82,3 +82,19 @@ container_deps()
|
|||
load("@io_bazel_rules_docker//repositories:pip_repositories.bzl", "pip_deps")
|
||||
|
||||
pip_deps()
|
||||
|
||||
# Dev Container stuff
|
||||
load("@io_bazel_rules_docker//contrib:dockerfile_build.bzl", "dockerfile_image")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_pull")
|
||||
|
||||
container_pull(
|
||||
name = "devcontainergo",
|
||||
registry = "mcr.microsoft.com",
|
||||
repository = "vscode/devcontainers/go",
|
||||
tag = "1.15",
|
||||
)
|
||||
|
||||
dockerfile_image(
|
||||
name = "dev-container",
|
||||
dockerfile = "//.devcontainer:Dockerfile",
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue