Skip to content

Commit 1cb8d07

Browse files
committed
fix publish_commit to be triggered in the context of GJ repo and only on merged PRs
1 parent 5853d24 commit 1cb8d07

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/publish_commit.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Publish Commit SHA for performance testing
22
on:
3-
pull_request:
3+
pull_request_target:
44
types:
55
- closed
66
branches:
@@ -12,10 +12,11 @@ permissions:
1212
contents: read # This is required for actions/checkout
1313
jobs:
1414
publishCommit:
15+
if: github.event.pull_request.merged == true
1516
runs-on: ubuntu-latest
1617
steps:
1718
- uses: aws-actions/configure-aws-credentials@v4
1819
with:
1920
role-to-assume: arn:aws:iam::637423498965:role/GitHubActionGrahQLJava
2021
aws-region: "ap-southeast-2"
21-
- run: aws sns publish --topic-arn "arn:aws:sns:ap-southeast-2:637423498965:graphql-java-commits.fifo" --message $GITHUB_SHA --message-group-id "graphql-java-commits"
22+
- run: aws sns publish --topic-arn "arn:aws:sns:ap-southeast-2:637423498965:graphql-java-commits.fifo" --message $GITHUB_SHA --message-group-id "graphql-java-commits"

0 commit comments

Comments
 (0)