Skip to content

Commit

Permalink
ci: fix debounce on push to main
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Oct 24, 2023
1 parent a68f2cf commit cd5ec4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@ env:
jobs:
debounce:
runs-on: ubuntu-latest
if: github.ref_name != 'debouce-fix'
env:
GH_TOKEN: ${{ github.token }}
outputs:
abort: ${{ steps.debounce.outputs.abort }}
steps:
- name: Debounce
if: github.ref_name != 'main' && github.event_name == 'push'
id: debounce
run: |
echo $GITHUB_REF_NAME
echo $GITHUB_EVENT_NAME
printenv
pr_branches=$(gh pr list --json headRefName --repo $GITHUB_REPOSITORY)
if [[ $(echo "$pr_branches" | jq -r --arg GITHUB_REF '.[].headRefName | select(. == $GITHUB_REF)') ]]; then
echo "This push is associated with a pull request. Skipping the job."
Expand Down

0 comments on commit cd5ec4d

Please sign in to comment.