Skip to content

Commit

Permalink
fix: Using Action and adding example ( Fixes #4, Fixes #5, Fixes #9 )
Browse files Browse the repository at this point in the history
Renaming secret environment variable
  • Loading branch information
James Brundage committed Dec 19, 2024
1 parent 873266c commit 3f41b17
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/BuildGQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ jobs:
uses: ./
id: ActionOnBranch
env:
GitHubToken: ${{ secrets.READ_ONLY_TOKEN }}
ReadOnlyToken: ${{ secrets.READ_ONLY_TOKEN }}
- name: Log in to ghcr.io
uses: docker/login-action@master
with:
Expand Down
2 changes: 1 addition & 1 deletion Build/GitHub/Jobs/BuildGQL.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
uses = './'
id = 'ActionOnBranch'
env = @{
GitHubToken = '${{ secrets.READ_ONLY_TOKEN }}'
ReadOnlyToken = '${{ secrets.READ_ONLY_TOKEN }}'
}
},
'BuildAndPublishContainer'
Expand Down
6 changes: 3 additions & 3 deletions Examples/GitGraphTypes.gql.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#requires -Module GQL
if (-not $env:GitHubToken) {
Write-Warning "No GitHubToken found."
if (-not $env:ReadOnlyToken) {
Write-Warning "No ReadOnlyToken found."
return
}

Push-Location $PSScriptRoot

# First, let's get the query
gql -Query ./GetSchemaTypes.gql -PersonalAccessToken $env:GitHubToken -Cache -OutputPath ./GitHubGraphTypes.json
gql -Query ./GetSchemaTypes.gql -PersonalAccessToken $env:ReadOnlyToken -Cache -OutputPath ./GitHubGraphTypes.json

Pop-Location

0 comments on commit 3f41b17

Please sign in to comment.