From 4f6dacf1247af4d2e80622ec8f8beec8483bab46 Mon Sep 17 00:00:00 2001 From: Lilly <46890129+RainbowDashLabs@users.noreply.github.com> Date: Mon, 10 Jul 2023 12:44:22 +0200 Subject: [PATCH 1/6] Try to cache docker images --- .github/workflows/docker.yml | 7 +++++++ .github/workflows/verify.yml | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 755c03c..3200958 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -32,6 +32,13 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Download Docker image artifact + uses: actions/download-artifact@v2 + with: + name: docker-image + path: /image/docker-image.tar + - name: Load Docker image + run: docker load -i /image/docker-image.tar - name: Push image uses: docker/build-push-action@v4 with: diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index e098a1c..ec4a112 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -29,5 +29,14 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Tag Docker image + run: docker tag krile krile:build - name: Build as Docker image run: docker build . + - name: Save Docker image + run: docker save -o docker-image.tar krile:build + - name: Archive Docker image + uses: actions/upload-artifact@v2 + with: + name: docker-image + path: ./docker-image.tar From b201b8db424e932b1591e6e8efe1e9dffe268bd1 Mon Sep 17 00:00:00 2001 From: Lilly <46890129+RainbowDashLabs@users.noreply.github.com> Date: Mon, 10 Jul 2023 12:46:30 +0200 Subject: [PATCH 2/6] Tag image --- .github/workflows/verify.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index ec4a112..837e012 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -29,10 +29,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Tag Docker image - run: docker tag krile krile:build - name: Build as Docker image - run: docker build . + run: docker build --tag krile:build . - name: Save Docker image run: docker save -o docker-image.tar krile:build - name: Archive Docker image From 3107485bccbc6192a54a9d8544ce5aa68772a5ae Mon Sep 17 00:00:00 2001 From: Lilly <46890129+RainbowDashLabs@users.noreply.github.com> Date: Mon, 10 Jul 2023 12:49:34 +0200 Subject: [PATCH 3/6] Always publish docker image --- .github/workflows/docker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3200958..88797fd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,6 +7,8 @@ on: branches: - main - development + - feature/* + - fix/* jobs: docker-build: From 01e1c562d9f39ad2c2b0ecf5a637200afc4b828b Mon Sep 17 00:00:00 2001 From: Lilly <46890129+RainbowDashLabs@users.noreply.github.com> Date: Mon, 10 Jul 2023 13:07:38 +0200 Subject: [PATCH 4/6] Use other action --- .github/workflows/docker.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 88797fd..f5a4ab0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -34,11 +34,18 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Download Docker image artifact - uses: actions/download-artifact@v2 + - name: Download artifact + uses: dawidd6/action-download-artifact@v2 with: + workflow: ${{ github.event.workflow_run.workflow_id }} + workflow_conclusion: success name: docker-image path: /image/docker-image.tar +# - name: Download Docker image artifact +# uses: actions/download-artifact@v2 +# with: +# name: docker-image +# path: /image/docker-image.tar - name: Load Docker image run: docker load -i /image/docker-image.tar - name: Push image From ad2fe04369a0dbb4405db9cc96e227495a8b023a Mon Sep 17 00:00:00 2001 From: Lilly <46890129+RainbowDashLabs@users.noreply.github.com> Date: Mon, 10 Jul 2023 13:15:29 +0200 Subject: [PATCH 5/6] Try again --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index f5a4ab0..735b7ed 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -37,7 +37,7 @@ jobs: - name: Download artifact uses: dawidd6/action-download-artifact@v2 with: - workflow: ${{ github.event.workflow_run.workflow_id }} + workflow: verify.yml workflow_conclusion: success name: docker-image path: /image/docker-image.tar From 9cca6c1f56063095f060f2e0809ad4c2398b7409 Mon Sep 17 00:00:00 2001 From: Lilly <46890129+RainbowDashLabs@users.noreply.github.com> Date: Mon, 10 Jul 2023 13:21:49 +0200 Subject: [PATCH 6/6] Try again --- .github/workflows/docker.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 735b7ed..f908fa0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -40,14 +40,13 @@ jobs: workflow: verify.yml workflow_conclusion: success name: docker-image - path: /image/docker-image.tar # - name: Download Docker image artifact # uses: actions/download-artifact@v2 # with: # name: docker-image # path: /image/docker-image.tar - name: Load Docker image - run: docker load -i /image/docker-image.tar + run: docker load -i ./docker-image.tar - name: Push image uses: docker/build-push-action@v4 with: