summary refs log tree commit diff
path: root/.github
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2021-06-14 13:47:22 +0200
committerDomen Kožar <domen@dev.si>2021-06-14 13:47:22 +0200
commitb390b929bd454cec2a291b6bdcf8bee7946a87b7 (patch)
treec4b97182ec85bbfb9147234b8d69dabad1be5a6d /.github
parent971c744e40503267f1b95198633e359ef26b8e1f (diff)
downloadnixpkgs-b390b929bd454cec2a291b6bdcf8bee7946a87b7.tar
nixpkgs-b390b929bd454cec2a291b6bdcf8bee7946a87b7.tar.gz
nixpkgs-b390b929bd454cec2a291b6bdcf8bee7946a87b7.tar.bz2
nixpkgs-b390b929bd454cec2a291b6bdcf8bee7946a87b7.tar.lz
nixpkgs-b390b929bd454cec2a291b6bdcf8bee7946a87b7.tar.xz
nixpkgs-b390b929bd454cec2a291b6bdcf8bee7946a87b7.tar.zst
nixpkgs-b390b929bd454cec2a291b6bdcf8bee7946a87b7.zip
direct-push action: delay to workaround eventually consistent DB
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/direct-push.yml3
1 files changed, 3 insertions, 0 deletions
diff --git a/.github/workflows/direct-push.yml b/.github/workflows/direct-push.yml
index 6177004295f..459475c3c6b 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