25.05 is Warbler
[NixPkgs.git] / .github / workflows / ofborg-pending.yml
blob2eba88598d7fece9d1b9b847b21e6d7c74d691c1
1 name: "Set pending OfBorg status"
2 on:
3   pull_request_target:
5 # Sets the ofborg-eval status to "pending" to signal that we are waiting for
6 # OfBorg even if it is running late. The status will be overwritten by OfBorg
7 # once it starts evaluation.
9 # WARNING:
10 # When extending this action, be aware that $GITHUB_TOKEN allows (restricted) write access to
11 # the GitHub repository. This means that it should not evaluate user input in a
12 # way that allows code injection.
14 permissions:
15   contents: read
17 jobs:
18   action:
19     name: set-ofborg-pending
20     if: github.repository_owner == 'NixOS'
21     permissions:
22       statuses: write
23     runs-on: ubuntu-latest
24     steps:
25     - name: "Set pending OfBorg status"
26       env:
27         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28       run: |
29         curl \
30           -X POST \
31           -H "Accept: application/vnd.github.v3+json" \
32           -H "Authorization: Bearer $GITHUB_TOKEN" \
33           -d '{"context": "ofborg-eval", "state": "pending", "description": "Waiting for OfBorg..."}' \
34           "https://api.github.com/repos/NixOS/nixpkgs/commits/${{ github.event.pull_request.head.sha }}/statuses"