Skip to content

Commit

Permalink
Case RE-851: Only run OpenStack GitHub Action when TestSuite Completes
Browse files Browse the repository at this point in the history
Changelog:
  • Loading branch information
davelcpanelnet committed Sep 26, 2024
1 parent 572aeb8 commit 2feb32a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/openstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ on:
tags-ignore:
- "*"
pull_request:
branches: [main]
workflow_dispatch:
workflow_run:
workflows: [testsuite]
types: [completed]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -34,6 +38,7 @@ env:
jobs:
terraform_openstack_create:
runs-on: self-hosted
if: ${{ github.event.workflow_run.conclusion == 'success' }}
defaults:
run:
working-directory: "./.github/workflows/openstack/terraform"
Expand Down Expand Up @@ -559,4 +564,9 @@ jobs:
name: ${{ github.run_id }}-tf.out.json
path: ${{ github.workspace }}/tf.out.json
- name: Destroy OpenStack VM
run: terraform destroy -no-color -auto-approve
run: terraform destroy -no-color -auto-approve
on-failure:
runs-on: self-hosted
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'Previous workflow testsuite did not complete successfully. '
4 changes: 4 additions & 0 deletions .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
testsuite:
env:
Expand Down

0 comments on commit 2feb32a

Please sign in to comment.