From 931d8b36b135781cf0d56a7472dc984e3c75aebb Mon Sep 17 00:00:00 2001 From: Joe Yates Date: Fri, 3 Nov 2023 08:28:03 +0100 Subject: [PATCH 1/3] Build image from feature branch --- .github/workflows/publish-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-image.yaml b/.github/workflows/publish-image.yaml index bc3e479c..98204647 100644 --- a/.github/workflows/publish-image.yaml +++ b/.github/workflows/publish-image.yaml @@ -3,7 +3,7 @@ name: Build and publish the production container image to the GitHub Registry # Run this workflow every time on every push to the branch `release`. on: push: - branches: ['release'] + branches: ['feature/improve-container-build'] env: IMAGE_NAME: imap-backup From c9f26ec313faa6ab8c8a7d5a9255c989464ff872 Mon Sep 17 00:00:00 2001 From: Joe Yates Date: Fri, 3 Nov 2023 08:28:17 +0100 Subject: [PATCH 2/3] Stub out the GitHub action test --- .github/workflows/publish-image.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/publish-image.yaml b/.github/workflows/publish-image.yaml index 98204647..725cdb1a 100644 --- a/.github/workflows/publish-image.yaml +++ b/.github/workflows/publish-image.yaml @@ -36,6 +36,10 @@ jobs: labels: | ${{ env.IMAGE_NAME }}:latest + # Check that imap-backup runs + - name: Test Image + run: podman run ${{ env.IMAGE_NAME }}:latest imap-backup help + - name: Publish Image # https://github.com/marketplace/actions/push-to-registry id: push-to-registry From 27de9870075b33d65bf7f0f7609c42b035a74e94 Mon Sep 17 00:00:00 2001 From: Joe Yates Date: Fri, 3 Nov 2023 08:34:59 +0100 Subject: [PATCH 3/3] Fail if imap-backup help doesn't product the expected output --- .github/workflows/publish-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-image.yaml b/.github/workflows/publish-image.yaml index 725cdb1a..0792f90e 100644 --- a/.github/workflows/publish-image.yaml +++ b/.github/workflows/publish-image.yaml @@ -38,7 +38,7 @@ jobs: # Check that imap-backup runs - name: Test Image - run: podman run ${{ env.IMAGE_NAME }}:latest imap-backup help + run: podman run ${{ env.IMAGE_NAME }}:latest imap-backup help | grep 'Commands:' - name: Publish Image # https://github.com/marketplace/actions/push-to-registry