1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 04:31:52 +00:00
nixpkgs/.github/workflows/wait-ofborg.yml
Jörg Thalheim 4681807395
Revert "temporary delete github actions"
This reverts commit 256dbf6980.

This did not solve the github action failures
2020-07-31 17:34:37 +01:00

32 lines
1,011 B
YAML

name: "Wait for ofborg"
on:
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Wait for ofborg CI
run: |
# wait for ~30min...
# ..in future a better fix would be to make ofborg mark CI as pending right away.
for i in $(seq 360); 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
echo "."
done
echo "Timeout!"
exit 1
# ofborg is not checking forks.
if: github.repository_owner == 'NixOS'
env:
GITHUB_TOKEN: ${{ github.token }}
COMMIT: ${{ github.event.pull_request.head.sha }}
OFBORG_APP_ID: 20500