Skip to content

Commit dbc6112

Browse files
authored
fix: Update run condition in migration tests github action (#1580)
1 parent b670961 commit dbc6112

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

.github/workflows/migration-tests.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,6 @@ on:
1111
types: [ labeled ]
1212

1313
jobs:
14-
set-output:
15-
runs-on: ubuntu-latest
16-
outputs:
17-
condition: ${{ steps.set-condition.outputs.condition }}
18-
steps:
19-
- name: Set Event Condition
20-
id: set-condition
21-
run: |
22-
if [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ] || [ "${{ github.event_name }}" = "schedule" ] || [ "${{ inputs.parent-event-name }}" = "release" ] || [ "${{ github.event.label.name }}" = "run-testacc-migration" ]; then
23-
echo "::set-output name=condition::true"
24-
else
25-
echo "::set-output name=condition::false"
26-
fi
2714
change-detection:
2815
runs-on: ubuntu-latest
2916
permissions:
@@ -32,9 +19,10 @@ jobs:
3219
outputs:
3320
project: ${{ steps.filter.outputs.project }}
3421
config: ${{ steps.filter.outputs.config }}
22+
shouldTriggerResourceTest: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || github.event.label.name == 'run-testacc' || inputs.parent-event-name == 'release' }}
3523
steps:
3624
- uses: actions/checkout@v4
37-
if: ${{ needs.set-output.outputs.condition == 'true' }}
25+
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || inputs.parent-event-name == 'release' }}
3826
- uses: dorny/paths-filter@v2
3927
id: filter
4028
with:
@@ -51,7 +39,7 @@ jobs:
5139
5240
project:
5341
needs: [ change-detection ]
54-
if: ${{ needs.set-output.outputs.condition == 'true' || needs.change-detection.outputs.project == 'true' || github.event.label.name == 'run-testacc-project-migration'}}
42+
if: ${{ needs.change-detection.outputs.project == 'true' || github.event.label.name == 'run-testacc-project'|| needs.change-detection.outputs.shouldTriggerResourceTest == 'true'}}
5543
runs-on: ubuntu-latest
5644
steps:
5745
- name: Checkout
@@ -87,7 +75,7 @@ jobs:
8775

8876
config:
8977
needs: [ change-detection ]
90-
if: ${{ needs.set-output.outputs.condition == 'true' || needs.change-detection.outputs.config == 'true' || github.event.label.name == 'run-testacc-config-migration'}}
78+
if: ${{ needs.change-detection.outputs.config == 'true' || github.event.label.name == 'run-testacc-config'|| needs.change-detection.outputs.shouldTriggerResourceTest == 'true'}}
9179
runs-on: ubuntu-latest
9280
steps:
9381
- name: Checkout

0 commit comments

Comments
 (0)