Skip to content

Commit

Permalink
Fix action run on base branch (#27860)
Browse files Browse the repository at this point in the history
* Fix action run on base branch

* Fix flink version precommit trailing newline

* Remove redundant checkout action for cron/push/dispatch event
  • Loading branch information
Abacn authored Aug 7, 2023
1 parent ee97da5 commit 347f84c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions .github/actions/setup-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,16 @@ inputs:
runs:
using: composite
steps:
- name: Check out repository code
- name: Check out repository code if pull request commit
uses: actions/checkout@v3
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request_target' ||
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch'
if: ${{ github.event_name == 'pull_request_target' }}
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: refs/pull/${{ github.event.number }}/merge
- name: Check out repository code if comment phrase
uses: actions/checkout@v3
if: ${{ github.event.comment.body == inputs.comment_phrase }}
with:
ref: refs/pull/${{ github.event.issue.number }}/head
ref: refs/pull/${{ github.event.issue.number }}/merge
- name: Rerun if comment phrase
if: ${{ github.event.comment.body == inputs.comment_phrase }}
uses: ./.github/actions/rerun-job-action
Expand All @@ -54,4 +50,4 @@ runs:
github_job: ${{ inputs.github_job || github.job }}
github_repository: ${{ github.repository }}
github_current_run_id: ${{ github.run_id }}
pull_request_url: ${{ github.event.issue.pull_request.url }}
pull_request_url: ${{ github.event.issue.pull_request.url }}
2 changes: 1 addition & 1 deletion .github/workflows/beam_PreCommit_Java_Flink_Versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
with:
gradle-command: :flinkPreCommit
arguments: |
-PdisableSpotlessCheck=true -PdisableCheckStyle=true
-PdisableSpotlessCheck=true -PdisableCheckStyle=true \
- name: Archive JUnit Test Results
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 347f84c

Please sign in to comment.