Skip to content

Commit

Permalink
try to prevent double build
Browse files Browse the repository at this point in the history
  • Loading branch information
machisuji committed Jan 22, 2025
1 parent 833ba70 commit 80ad172
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,17 +215,19 @@ jobs:
- name: Extract vendor/bundle from container
run: |
docker create --name bundle ${{ steps.build.outputs.imageid }}
rm -rf vendor/bundle || true
mv vendor/bundle vendor/bundle.bak
docker cp bundle:/app/vendor/bundle vendor/bundle
docker rm bundle
echo 'vendor/bundle' >> .dockerignore
- name: Save vendor/bundle
id: save-vendor-bundle
uses: actions/cache/save@v4
with:
path: |
vendor/bundle
key: ${{ steps.restore-vendor-bundle.outputs.cache-primary-key }}
- name: Restore local vendor/bundle to prevent rebuilding of image during push
run: |
rm -rf vendor/bundle && mv vendor/bundle.bak vendor/bundle
- name: Test
# We only test the native container. If that fails the builds for the others
# will be cancelled as well.
Expand Down

0 comments on commit 80ad172

Please sign in to comment.