Skip to content

Commit

Permalink
stop duplicate gate workflow runs (#1433)
Browse files Browse the repository at this point in the history
The integration tests is triggered twice on force pushes to master.
We only want it to run once.

* trigger integration tests on merges to master branch
* trigger integration tests on creation of branches from PRs
* do not trigger integration tests twice
  • Loading branch information
zaro0508 committed Feb 3, 2024
1 parent f1c72b1 commit eb8fe8a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/branch-integration-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: branch-integration-tests

on:
push:
branches:
- '*'

jobs:
integration-tests:
if: ${{ github.ref != 'refs/heads/master' }}
uses: "./.github/workflows/integration-tests.yaml"
with:
# role generated from https://github.com/Sceptre/sceptre-aws/blob/master/config/prod/gh-oidc-sceptre-tests.yaml
role-to-assume: "arn:aws:iam::743644221192:role/gh-oidc-sceptre-tests"
2 changes: 1 addition & 1 deletion .github/workflows/gate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
types:
- completed
branches:
- '*'
- master

jobs:
integration-tests:
Expand Down

0 comments on commit eb8fe8a

Please sign in to comment.