mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
ci: move dev-container to only as-needed
This commit is contained in:
parent
1803cd3c6c
commit
4780cf2253
3 changed files with 35 additions and 9 deletions
|
@ -6,5 +6,5 @@ container_push(
|
|||
image = "@dev-container//image:dockerfile_image.tar",
|
||||
registry = "docker.pkg.github.com",
|
||||
repository = "roleypoly/roleypoly/dev-container",
|
||||
tag = "{STABLE_GIT_BRANCH}" if "{STABLE_GIT_BRANCH}" != "main" else "latest",
|
||||
tag = "{STABLE_GIT_BRANCH}",
|
||||
)
|
||||
|
|
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -57,11 +57,3 @@ jobs:
|
|||
with:
|
||||
name: manifest.json
|
||||
path: manifest.json
|
||||
|
||||
- name: Publish Dev Container Image
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
"${GITHUB_WORKSPACE}/bin/bazel" run \
|
||||
--stamp \
|
||||
--workspace_status_command hack/workspace_status.sh\
|
||||
//.devcontainer:publish-dev-container
|
||||
|
|
34
.github/workflows/dev-container.yml
vendored
Normal file
34
.github/workflows/dev-container.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Build Dev Container
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- .devcontainer/Dockerfile
|
||||
schedule:
|
||||
- cron: "0 12 * * 2" # 12 noon every tuesday
|
||||
|
||||
jobs:
|
||||
dev_container_build:
|
||||
name: Bazel Build (Dev Container)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Mount bazel cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: "/home/runner/.cache/bazel"
|
||||
key: bazel
|
||||
|
||||
- name: Install bazelisk
|
||||
run: |
|
||||
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64"
|
||||
mkdir -p "${GITHUB_WORKSPACE}/bin/"
|
||||
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
|
||||
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
|
||||
|
||||
- name: Build & Publish Dev Container
|
||||
run: |
|
||||
"${GITHUB_WORKSPACE}/bin/bazel" run \
|
||||
--stamp \
|
||||
--workspace_status_command hack/workspace_status.sh\
|
||||
//.devcontainer:publish-dev-container
|
Loading…
Add table
Reference in a new issue