diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2020-07-21 08:58:09 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2020-07-21 09:39:38 +0100 |
commit | 4f95d1f2597cb0e60ab7409fd147b81dea4db509 (patch) | |
tree | 41e413ba1b061214276c246969eff7973c1a8b1c /.github | |
parent | 622150e8734ba1c4528c40fd965c9e9a97f9d57a (diff) | |
download | nixpkgs-4f95d1f2597cb0e60ab7409fd147b81dea4db509.tar nixpkgs-4f95d1f2597cb0e60ab7409fd147b81dea4db509.tar.gz nixpkgs-4f95d1f2597cb0e60ab7409fd147b81dea4db509.tar.bz2 nixpkgs-4f95d1f2597cb0e60ab7409fd147b81dea4db509.tar.lz nixpkgs-4f95d1f2597cb0e60ab7409fd147b81dea4db509.tar.xz nixpkgs-4f95d1f2597cb0e60ab7409fd147b81dea4db509.tar.zst nixpkgs-4f95d1f2597cb0e60ab7409fd147b81dea4db509.zip |
add github action to wait for ofborg
In case ofborg is down this will not mark the CI as green. Also if other github actions are used and pass checks will be still marked as pending even if other other github actions have passed.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/wait-ofborg.yml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/wait-ofborg.yml b/.github/workflows/wait-ofborg.yml new file mode 100644 index 00000000000..52185ce03ce --- /dev/null +++ b/.github/workflows/wait-ofborg.yml @@ -0,0 +1,28 @@ +name: "Wait for ofborg" +on: + pull_request: +jobs: + tests: + runs-on: ubuntu-latest + steps: + - name: Wait for ofborg CI + run: | + # wait for ~10min + set -x + for i in $(seq 120); do + res=$(curl --silent \ + -H "Accept: application/vnd.github.antiope-preview+json" \ + -H "Authorization: token ${GITHUB_TOKEN}" \ + "https://api.github.com/repos/NixOS/nixpkgs/commits/${COMMIT}/check-runs" | \ + jq ".check_runs | map(.app) | map(.id) | contains([${OFBORG_APP_ID}])") + if [[ "$res" == "true" ]]; then + exit 0 + fi + sleep 5 + done + echo "Timeout!" + exit 1 + env: + GITHUB_TOKEN: ${{ github.token }} + COMMIT: ${{ github.event.pull_request.head.sha }} + OFBORG_APP_ID: 20500 |