Skip to content

Commit

Permalink
token
Browse files Browse the repository at this point in the history
  • Loading branch information
gvolpe committed Jan 23, 2025
1 parent 682664e commit 9193896
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/actions/garnix-check/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Garnix status check
description: Determines whether to build the Nix config on GHA or not based on the Garnix status check
inputs:
github_token:
required: true
outputs:
garnix:
description: "The status check response, which may be failure or success"
Expand All @@ -15,7 +18,7 @@ runs:
run: |
STATUS=$(curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Authorization: Bearer ${{ inputs.github_token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/gvolpe/nix-config/check-suites/33419075802/check-runs | \
jq -r '.check_runs | .[] | select (.output.text | contains("monthly CI quota")) | select (.status == "completed") | .conclusion')
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/nixos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
- name: Garnix check status
id: garnix
uses: ./.github/actions/garnix-check
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

build:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 9193896

Please sign in to comment.