DBZ-6239 Use pull_request instead of pull_request_target
This commit is contained in:
parent
440e441a90
commit
66ee2dd4eb
15
.github/workflows/oracle-workflow-test.yml
vendored
15
.github/workflows/oracle-workflow-test.yml
vendored
@ -18,7 +18,7 @@ on:
|
|||||||
- 'debezium-bom/pom.xml'
|
- 'debezium-bom/pom.xml'
|
||||||
- 'pom.xml'
|
- 'pom.xml'
|
||||||
- '.github/workflows/oracle-workflow-test.yml'
|
- '.github/workflows/oracle-workflow-test.yml'
|
||||||
pull_request_target:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- 1.*
|
- 1.*
|
||||||
@ -51,13 +51,20 @@ jobs:
|
|||||||
QUAY_IO_USERNAME: ${{ secrets.QUAY_IO_USERNAME }}
|
QUAY_IO_USERNAME: ${{ secrets.QUAY_IO_USERNAME }}
|
||||||
QUAY_IO_PASSWORD: ${{ secrets.QUAY_IO_PASSWORD }}
|
QUAY_IO_PASSWORD: ${{ secrets.QUAY_IO_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
if [[ $QUAY_IO_USERNAME == '' && $QUAY_IO_PASSWORD == '' ]]; then
|
if [[ $QUAY_IO_USERNAME == '' ]] && [[ $QUAY_IO_PASSWORD == '' ]]; then
|
||||||
echo "SKIP_CHECK=true" >> $GITHUB_OUTPUT
|
echo "SKIP_CHECK=true" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
- name: Check failure
|
||||||
|
if: ${{ steps.skip.outputs.SKIP_CHECK == 'true' }}
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
continue-on-error: false
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
throw new Error("Author @${{ github.event.pull_request.user.login }} doesn't have credentials to run the workflow. Denied access.")
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ needs.check.outputs.SKIP_CHECK != 'true' || contains(fromJSON('["push", "pull_request"]'), github.event_name) }}
|
needs: [check]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Action
|
- name: Checkout Action
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
Loading…
Reference in New Issue
Block a user