Skip to content

Commit b2b1d3d

Browse files
committed
.github/workflows: pending-{set,clear}
1 parent 1c5d288 commit b2b1d3d

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "clear pending status"
2+
3+
on:
4+
check_suite:
5+
types: [ completed ]
6+
7+
jobs:
8+
action:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: clear pending status
12+
if: github.repository_owner == 'NixOS' && github.event.check_suite.app.name == 'OfBorg'
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
GSU_VERSION: "0.5.0"
16+
GSU_URL: "https://github.com/cloudposse/github-status-updater/releases/download"
17+
run: |
18+
curl -sSf -O -L -C - \
19+
"$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \
20+
chmod +x github-status-updater_linux_amd64 && \
21+
./github-status-updater_linux_amd64 \
22+
-action update_state \
23+
-token "$GITHUB_TOKEN" \
24+
-owner NixOS \
25+
-repo nixpkgs \
26+
-state success \
27+
-context "Wait for ofborg" \
28+
-description " " \
29+
-url " " \
30+
-ref "${{ github.event.check_suite.head_sha }}"

.github/workflows/pending-set.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "set pending status"
2+
3+
on:
4+
pull_request_target:
5+
6+
jobs:
7+
action:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: set pending status
11+
if: github.repository_owner == 'NixOS'
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
GSU_VERSION: "0.5.0"
15+
GSU_URL: "https://github.com/cloudposse/github-status-updater/releases/download"
16+
run: |
17+
curl -sSf -O -L -C - \
18+
"$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \
19+
chmod +x github-status-updater_linux_amd64 && \
20+
./github-status-updater_linux_amd64 \
21+
-action update_state \
22+
-token "$GITHUB_TOKEN" \
23+
-owner NixOS \
24+
-repo nixpkgs \
25+
-state failure \
26+
-context "Wait for ofborg" \
27+
-description "This failed status will be cleared when ofborg finishes eval." \
28+
-url " " \
29+
-ref "${{ github.event.pull_request.head.sha }}"

0 commit comments

Comments
 (0)