diff options
author | zowoq <59103226+zowoq@users.noreply.github.com> | 2020-08-23 15:57:07 +1000 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2020-08-25 14:28:20 +1000 |
commit | b2b1d3da0396824f0a79afade36f18b64f3d3d42 (patch) | |
tree | bfac81060345fe927d7c97363a8529b581a0ab6d | |
parent | 1c5d2884b12ad40ad539d78356b579c14fd93ca0 (diff) | |
download | nixpkgs-b2b1d3da0396824f0a79afade36f18b64f3d3d42.tar nixpkgs-b2b1d3da0396824f0a79afade36f18b64f3d3d42.tar.gz nixpkgs-b2b1d3da0396824f0a79afade36f18b64f3d3d42.tar.bz2 nixpkgs-b2b1d3da0396824f0a79afade36f18b64f3d3d42.tar.lz nixpkgs-b2b1d3da0396824f0a79afade36f18b64f3d3d42.tar.xz nixpkgs-b2b1d3da0396824f0a79afade36f18b64f3d3d42.tar.zst nixpkgs-b2b1d3da0396824f0a79afade36f18b64f3d3d42.zip |
.github/workflows: pending-{set,clear}
-rw-r--r-- | .github/workflows/pending-clear.yml | 30 | ||||
-rw-r--r-- | .github/workflows/pending-set.yml | 29 |
2 files changed, 59 insertions, 0 deletions
diff --git a/.github/workflows/pending-clear.yml b/.github/workflows/pending-clear.yml new file mode 100644 index 00000000000..d888a414506 --- /dev/null +++ b/.github/workflows/pending-clear.yml @@ -0,0 +1,30 @@ +name: "clear pending status" + +on: + check_suite: + types: [ completed ] + +jobs: + action: + runs-on: ubuntu-latest + steps: + - name: clear pending status + if: github.repository_owner == 'NixOS' && github.event.check_suite.app.name == 'OfBorg' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GSU_VERSION: "0.5.0" + 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" && \ + 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 }}" diff --git a/.github/workflows/pending-set.yml b/.github/workflows/pending-set.yml new file mode 100644 index 00000000000..ee1d537295c --- /dev/null +++ b/.github/workflows/pending-set.yml @@ -0,0 +1,29 @@ +name: "set pending status" + +on: + pull_request_target: + +jobs: + action: + runs-on: ubuntu-latest + steps: + - name: set pending status + if: github.repository_owner == 'NixOS' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GSU_VERSION: "0.5.0" + 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" && \ + 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 }}" |