From f88ffc1f16e998df0063e54e476a35bc97c171ac Mon Sep 17 00:00:00 2001 From: David Wheatley Date: Mon, 8 Apr 2024 19:11:41 +0200 Subject: [PATCH] fix: prevent excess ci runs --- .github/workflows/smoketest.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/smoketest.yml b/.github/workflows/smoketest.yml index 806ed317a..9e47a65a1 100644 --- a/.github/workflows/smoketest.yml +++ b/.github/workflows/smoketest.yml @@ -35,6 +35,10 @@ jobs: runs-on: ubuntu-latest name: Test, build and deploy + if: + ${{ !contains(github.event_name, 'pull_request') || ((github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork) || (github.event_name == 'pull_request_target' && + github.event.pull_request.head.repo.fork && contains(github.event.label.name, '๐Ÿš€ request deploy'))) }} + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.head.ref || github.ref }} cancel-in-progress: true @@ -42,6 +46,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.ref }} - name: Find existing build status comment continue-on-error: true @@ -161,7 +167,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - name: ['๐Ÿš€ request deploy'] + name: ['๐Ÿš€request-deploy'] }) - name: Find existing build status comment