fix(ci): disable pull_request_target (#4315)

This commit is contained in:
Mikołaj Młodzikowski 2023-07-13 11:19:37 +02:00 committed by GitHub
parent 8b6b904cd6
commit 94a067e34b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 10 deletions

View File

@ -5,9 +5,7 @@ on:
branches: branches:
- release/* - release/*
- develop - develop
# uncomment pull_request and comment pull_request_target to test CI changes against feature branch not target branch (develop) pull_request:
# pull_request:
pull_request_target:
types: types:
- opened - opened
- ready_for_review - ready_for_review
@ -48,7 +46,7 @@ jobs:
lint-pr-title: lint-pr-title:
needs: node-modules needs: node-modules
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} if: ${{ github.event_name == 'pull_request' }}
name: Verify PR title name: Verify PR title
uses: ./.github/workflows/lint-pr.yml uses: ./.github/workflows/lint-pr.yml
secrets: inherit secrets: inherit
@ -231,7 +229,7 @@ jobs:
publish-dist: publish-dist:
needs: lint-test-build needs: lint-test-build
name: '(CD) publish dist' name: '(CD) publish dist'
# if: ${{ needs.lint-test-build.outputs.projects != '[]' }} if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'vegaprotocol/frontend-monorepo') || github.event_name == 'push' }}
uses: ./.github/workflows/publish-dist.yml uses: ./.github/workflows/publish-dist.yml
secrets: inherit secrets: inherit
with: with:
@ -242,7 +240,7 @@ jobs:
needs: needs:
- publish-dist - publish-dist
- lint-test-build - lint-test-build
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'vegaprotocol/frontend-monorepo' }}
timeout-minutes: 60 timeout-minutes: 60
name: '(CD) comment preview links' name: '(CD) comment preview links'
steps: steps:
@ -288,7 +286,7 @@ jobs:
with: with:
issue-number: ${{ github.event.pull_request.number }} issue-number: ${{ github.event.pull_request.number }}
body: | body: |
Previews: Previews
* governance: ${{ needs.lint-test-build.outputs.preview_governance }} * governance: ${{ needs.lint-test-build.outputs.preview_governance }}
* explorer: ${{ needs.lint-test-build.outputs.preview_explorer }} * explorer: ${{ needs.lint-test-build.outputs.preview_explorer }}
* trading: ${{ needs.lint-test-build.outputs.preview_trading }} * trading: ${{ needs.lint-test-build.outputs.preview_trading }}

View File

@ -30,7 +30,7 @@ jobs:
echo IS_IPFS_RELEASE=false >> $GITHUB_ENV echo IS_IPFS_RELEASE=false >> $GITHUB_ENV
- name: Is PR - name: Is PR
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} if: ${{ github.event_name == 'pull_request' }}
run: | run: |
echo IS_PR=true >> $GITHUB_ENV echo IS_PR=true >> $GITHUB_ENV
@ -96,8 +96,8 @@ jobs:
bucketName='' bucketName=''
if [[ "${{ github.ref }}" =~ .*release/.* ]]; then if [[ "${{ github.ref }}" =~ .*release/.* ]]; then
# remove prefixing release/ and take the first string limited by / which is supposed to be name of the environment for releasing # remove prefixing release/ and take the first string limited by - which is supposed to be name of the environment for releasing (format: release/testnet-trading)
envName="$(echo ${{ github.ref }} | sed -e "s|release/||" | cut -d '/' -f 1 )" envName="$(echo ${{ github.ref }} | sed -e "s|release/||" | cut -d '-' -f 1 )"
elif [[ "${{ github.ref }}" =~ .*develop$ ]]; then elif [[ "${{ github.ref }}" =~ .*develop$ ]]; then
envName="stagnet1" envName="stagnet1"
if [[ "${{ matrix.app }}" = "multisig-signer" ]]; then if [[ "${{ matrix.app }}" = "multisig-signer" ]]; then