Skip to content

Commit

Permalink
ci: Delete downloaded container image (#11162)
Browse files Browse the repository at this point in the history
Delete the downloaded container image from the temporary path; the
GitHub action has already loaded it into docker.

This annoying workaround should help with build runs still failing with
#11013.
  • Loading branch information
hangy authored Dec 22, 2024
1 parent 32d58e0 commit 37fd932
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,17 @@ jobs:
key: taxonomies-${{ hashFiles('taxonomies/**') }}
restore-keys: taxonomies-
- name: Download backend image from artifacts
id: downloadbackendimage
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "openfoodfacts-server/backend:dev"
# downloadbackendimage task loads the image into docker and keeps the original file.
# As our runs tend to hit the storage limits for GitHub Actions, manually delete the
# downloaded file for now. It's not needed after being loaded into docker.
- name: Remove downloaded image
env:
FILE: "${{ steps.downloadbackendimage.outputs.download_path }}"
run: rm $FILE
- name: build taxonomies (should use cache)
run: make DOCKER_LOCAL_DATA="$(pwd)" build_taxonomies GITHUB_TOKEN="${{ secrets.TAXONOMY_CACHE_GITHUB_TOKEN }}"
- name: check taxonomies
Expand Down Expand Up @@ -148,9 +156,17 @@ jobs:
run: |
git ls-files taxonomies/ | xargs -I{} git log -1 --date=format:%Y%m%d%H%M.%S --format='touch -t %ad "{}"' "{}" | bash
- name: Download backend image from artifacts
id: downloadbackendimage
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "openfoodfacts-server/backend:dev"
# downloadbackendimage task loads the image into docker and keeps the original file.
# As our runs tend to hit the storage limits for GitHub Actions, manually delete the
# downloaded file for now. It's not needed after being loaded into docker.
- name: Remove downloaded image
env:
FILE: "${{ steps.downloadbackendimage.outputs.download_path }}"
run: rm $FILE
- name: tests
run: |
make codecov_prepare
Expand Down Expand Up @@ -182,9 +198,17 @@ jobs:
key: taxonomies-${{ hashFiles('taxonomies/**') }}
restore-keys: taxonomies-
- name: Download backend image from artifacts
id: downloadbackendimage
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "openfoodfacts-server/backend:dev"
# downloadbackendimage task loads the image into docker and keeps the original file.
# As our runs tend to hit the storage limits for GitHub Actions, manually delete the
# downloaded file for now. It's not needed after being loaded into docker.
- name: Remove downloaded image
env:
FILE: "${{ steps.downloadbackendimage.outputs.download_path }}"
run: rm $FILE
- name: set right UID and GID in .envrc
run: |
rm -f .envrc
Expand Down

0 comments on commit 37fd932

Please sign in to comment.