Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: always pull docker image from remote to prevent out of sync tags #12351

Merged
merged 3 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"ryuta46.multi-command",
"coolchyni.beyond-debug",
],
"initializeCommand": "docker pull ghcr.io/magma/magma/devcontainer:latest",
"image": "ghcr.io/magma/magma/devcontainer:latest",
"settings": {
"search.followSymlinks": false,
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,15 @@ jobs:
run: |
./.github/workflows/check-bazel-cache-dir-size.sh "$BAZEL_CACHE_REPO_DIR" "$BAZEL_CACHE_REPO_CUTOFF_MB"
- name: Setup Devcontainer Image
uses: addnab/docker-run-action@v2
uses: addnab/docker-run-action@v3
with:
image: ${{ env.DEVCONTAINER_IMAGE }}
options: --pull always
# Run a simple echo command to pull down the image. This makes it a bit more clear how much time is spent on building Magma and not pulling down the image.
run: |
echo "Pulled the devontainer image!"
- name: Run `bazel build //...`
uses: addnab/docker-run-action@v2
uses: addnab/docker-run-action@v3
with:
image: ${{ env.DEVCONTAINER_IMAGE }}
# TODO: Remove work-around mount of Github workspace to /magma (https://github.com/addnab/docker-run-action/issues/11)
Expand Down Expand Up @@ -168,14 +169,15 @@ jobs:
./.github/workflows/check-bazel-cache-dir-size.sh "$BAZEL_CACHE_DIR" "$BAZEL_CACHE_CUTOFF_MB"
# Letting the Build job above handle cache clean up for bazel-cache-repo
- name: Setup Devcontainer Image
uses: addnab/docker-run-action@v2
uses: addnab/docker-run-action@v3
with:
image: ${{ env.DEVCONTAINER_IMAGE }}
options: --pull always
# Run a simple echo command to pull down the image. This makes it a bit more clear how much time is spent on building Magma and not pulling down the image.
run: |
echo "Pulled the devontainer image!"
- name: Run `bazel test //...`
uses: addnab/docker-run-action@v2
uses: addnab/docker-run-action@v3
with:
image: ${{ env.DEVCONTAINER_IMAGE }}
# TODO: Remove work-around mount of Github workspace to /magma (https://github.com/addnab/docker-run-action/issues/11)
Expand All @@ -184,7 +186,7 @@ jobs:
cd /workspaces/magma
bazel test //... --test_output=errors --cache_test_results=no
- name: Run `bazel run //:check_starlark_format`
uses: addnab/docker-run-action@v2
uses: addnab/docker-run-action@v3
Neudrino marked this conversation as resolved.
Show resolved Hide resolved
with:
image: ${{ env.DEVCONTAINER_IMAGE }}
# TODO: Remove work-around mount of Github workspace to /magma (https://github.com/addnab/docker-run-action/issues/11)
Expand Down