mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 16:46:51 +02:00
fix: Skip environment if it wasn't changed
This commit is contained in:
@@ -24,10 +24,16 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
env: [ test ]
|
env: [ test ]
|
||||||
if: contains(needs.fact-finding.outputs.changed_envs, matrix.env)
|
|
||||||
environment: ${{ matrix.env }}
|
environment: ${{ matrix.env }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Exit if this environment wasn't changed
|
||||||
|
run: |
|
||||||
|
echo "Changed envs: '${{ needs.fact-finding.outputs.changed_envs }}'"
|
||||||
|
if [[ ! " ${{ needs.fact-finding.outputs.changed_envs }} " =~ " ${{ matrix.env }} " ]]; then
|
||||||
|
echo "Environment '${{ matrix.env }}' was not modified. Skipping."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
- name: Build & push Nginx image to GHCR
|
- name: Build & push Nginx image to GHCR
|
||||||
if: steps.detect.outputs.changed_envs != ''
|
if: steps.detect.outputs.changed_envs != ''
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user