From f66c60ffcad9f62e6291a638d6414c68e1ded4be Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sat, 2 Aug 2025 21:47:35 +0200 Subject: [PATCH] refactor: Move creation of nginx image to separate job --- .github/workflows/deploy.yaml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 48d9289..f1154ba 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -27,19 +27,19 @@ jobs: id: detect run: | echo "changed_envs=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '^docker/' | cut -d/ -f2 | sort -u | tr '\n' ' ')" >> "$GITHUB_OUTPUT" - deploy: - name: Deploy + create-nginx: + name: Build Nginx image runs-on: ubuntu-latest needs: fact-finding - strategy: - matrix: - env: [ test ] - environment: ${{ matrix.env }} permissions: contents: read packages: write attestations: write id-token: write + strategy: + matrix: + env: [ test ] + environment: ${{ matrix.env }} steps: - uses: actions/checkout@v4 - name: Exit if this environment wasn't changed @@ -84,6 +84,18 @@ jobs: with: subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} subject-digest: ${{ steps.push.outputs.digest }} + deploy: + name: Deploy + runs-on: ubuntu-latest + needs: + - fact-finding + - create-nginx + strategy: + matrix: + env: [ test ] + environment: ${{ matrix.env }} + steps: + - uses: actions/checkout@v4 - name: Copy files to remote if: steps.check.outputs.should_deploy == 'true' uses: burnett01/rsync-deployments@7.0.2