mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 16:46:51 +02:00
refactor: Move creation of nginx image to separate job
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user