diff options
author | Domen Kožar <domen@dev.si> | 2021-06-14 13:47:22 +0200 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2021-06-14 13:47:22 +0200 |
commit | b390b929bd454cec2a291b6bdcf8bee7946a87b7 (patch) | |
tree | c4b97182ec85bbfb9147234b8d69dabad1be5a6d /.github | |
parent | 971c744e40503267f1b95198633e359ef26b8e1f (diff) |
direct-push action: delay to workaround eventually consistent DB
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/direct-push.yml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/.github/workflows/direct-push.yml b/.github/workflows/direct-push.yml index 6177004295ffe..459475c3c6bca 100644 --- a/.github/workflows/direct-push.yml +++ b/.github/workflows/direct-push.yml @@ -17,6 +17,9 @@ jobs: run: | ISMERGE=$(curl -H 'Accept: application/vnd.github.groot-preview+json' -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ env.GITHUB_REPOSITORY }}/commits/${{ env.GITHUB_SHA }}/pulls | jq -r '.[] | select(.merge_commit_sha == "${{ env.GITHUB_SHA }}") | any') echo "::set-output name=ismerge::$ISMERGE" + # github events are eventually consistent, so wait until changes propagate to thier DB + - run: sleep 60 + if: steps.ismerge.outputs.ismerge != 'true' - name: Warn if the commit was a direct push if: steps.ismerge.outputs.ismerge != 'true' uses: peter-evans/commit-comment@v1 |