mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 08:37:56 +02:00
fix: Skip environment if it wasn't changed
This commit is contained in:
@@ -24,10 +24,16 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
env: [ test ]
|
||||
if: contains(needs.fact-finding.outputs.changed_envs, matrix.env)
|
||||
environment: ${{ matrix.env }}
|
||||
steps:
|
||||
- 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
|
||||
if: steps.detect.outputs.changed_envs != ''
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user