Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

prevent building image from scratch a 2nd time during push

Markus Kahlb706cf3e31ac
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 8332dcfd6d8..09044cc6907 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -219,7 +219,7 @@ 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
- name: Save vendor/bundle
@@ -229,6 +229,9 @@ jobs:
path: |
vendor/bundle
key: ${{ steps.restore-vendor-bundle.outputs.cache-primary-key }}
+ - name: Restore pre-build vendor/bundle to prevent 2nd build from scratch 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.