summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorzowoq <59103226+zowoq@users.noreply.github.com>2020-08-26 22:03:45 +1000
committerzowoq <59103226+zowoq@users.noreply.github.com>2020-08-26 22:04:40 +1000
commit64a2de1fc0c16b1a5ff9afe8c85aeb4dcfa019bb (patch)
tree090ee50c142a46c1f2fec90ac18bb44156631386 /.github
parent4d43de37b26e5d887d9a1b20e2e0294a560b42b9 (diff)
.github/workflow/pending-{set,clear}: switch to curl
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/pending-clear.yml26
-rw-r--r--.github/workflows/pending-set.yml26
2 files changed, 12 insertions, 40 deletions
diff --git a/.github/workflows/pending-clear.yml b/.github/workflows/pending-clear.yml
index e9eb9395bc4d..d06b1e2143f1 100644
--- a/.github/workflows/pending-clear.yml
+++ b/.github/workflows/pending-clear.yml
@@ -12,24 +12,10 @@ jobs:
if: github.repository_owner == 'NixOS' && github.event.check_suite.app.name == 'OfBorg'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- GSU_VERSION: "0.5.0"
- GSU_HASH: "49df54dc0ed5eaa037400b66be8114bd62fa0af51ed36565f6203dc312711cc6"
- GSU_URL: "https://github.com/cloudposse/github-status-updater/releases/download"
run: |
- curl -sSf -O -L -C - \
- "$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \
- if [ "$(shasum -a 256 github-status-updater_linux_amd64 | cut -c1-64)" != "$GSU_HASH" ]; then
- echo "checksum mismatch"
- exit 1
- fi
- chmod +x github-status-updater_linux_amd64 && \
- ./github-status-updater_linux_amd64 \
- -action update_state \
- -token "$GITHUB_TOKEN" \
- -owner NixOS \
- -repo nixpkgs \
- -state success \
- -context "Wait for ofborg" \
- -description " " \
- -url " " \
- -ref "${{ github.event.check_suite.head_sha }}"
+ curl \
+ -X POST \
+ -H "Accept: application/vnd.github.v3+json" \
+ -H "Authorization: token $GITHUB_TOKEN" \
+ -d '{"state": "success", "target_url": " ", "description": " ", "context": "Wait for ofborg"}' \
+ "https://api.github.com/repos/NixOS/nixpkgs/statuses/${{ github.event.check_suite.head_sha }}"
diff --git a/.github/workflows/pending-set.yml b/.github/workflows/pending-set.yml
index 36104706b6fe..f59ac9439eac 100644
--- a/.github/workflows/pending-set.yml
+++ b/.github/workflows/pending-set.yml
@@ -11,24 +11,10 @@ jobs:
if: github.repository_owner == 'NixOS'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- GSU_VERSION: "0.5.0"
- GSU_HASH: "49df54dc0ed5eaa037400b66be8114bd62fa0af51ed36565f6203dc312711cc6"
- GSU_URL: "https://github.com/cloudposse/github-status-updater/releases/download"
run: |
- curl -sSf -O -L -C - \
- "$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \
- if [ "$(shasum -a 256 github-status-updater_linux_amd64 | cut -c1-64)" != "$GSU_HASH" ]; then
- echo "checksum mismatch"
- exit 1
- fi
- chmod +x github-status-updater_linux_amd64 && \
- ./github-status-updater_linux_amd64 \
- -action update_state \
- -token "$GITHUB_TOKEN" \
- -owner NixOS \
- -repo nixpkgs \
- -state failure \
- -context "Wait for ofborg" \
- -description "This failed status will be cleared when ofborg finishes eval." \
- -url " " \
- -ref "${{ github.event.pull_request.head.sha }}"
+ curl \
+ -X POST \
+ -H "Accept: application/vnd.github.v3+json" \
+ -H "Authorization: token $GITHUB_TOKEN" \
+ -d '{"state": "failure", "target_url": " ", "description": "This failed status will be cleared when ofborg finishes eval.", "context": "Wait for ofborg"}' \
+ "https://api.github.com/repos/NixOS/nixpkgs/statuses/${{ github.event.pull_request.head.sha }}"