Skip to content

Commit

Permalink
ci: forgot to set the token
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney committed Feb 26, 2024
1 parent cea8ba8 commit cfbefe6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ jobs:
app-id: "${{ secrets.APP_ID }}"
owner: "${{ github.repository_owner }}"
private-key: "${{ secrets.APP_PRIVATE_KEY }}"
- id: "github_app_token"
name: "set github token"
run: |
if [[ "${USE_GITHUB_APP_TOKEN}" == "true" ]]; then
echo "token=${{ steps.get_github_app_token.outputs.token }}" >> $GITHUB_OUTPUT
else
echo "token=${{ secrets.GH_TOKEN }}" >> $GITHUB_OUTPUT
end
- id: "version"
name: "get release version"
run: |
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ jobs:
app-id: "${{ secrets.APP_ID }}"
owner: "${{ github.repository_owner }}"
private-key: "${{ secrets.APP_PRIVATE_KEY }}"
- id: "github_app_token"
name: "set github token"
run: |
if [[ "${USE_GITHUB_APP_TOKEN}" == "true" ]]; then
echo "token=${{ steps.get_github_app_token.outputs.token }}" >> $GITHUB_OUTPUT
else
echo "token=${{ secrets.GH_TOKEN }}" >> $GITHUB_OUTPUT
end
- name: "download binaries"
run: |
echo "downloading binaries to $(pwd)/dist"
Expand Down Expand Up @@ -146,6 +154,14 @@ jobs:
app-id: "${{ secrets.APP_ID }}"
owner: "${{ github.repository_owner }}"
private-key: "${{ secrets.APP_PRIVATE_KEY }}"
- id: "github_app_token"
name: "set github token"
run: |
if [[ "${USE_GITHUB_APP_TOKEN}" == "true" ]]; then
echo "token=${{ steps.get_github_app_token.outputs.token }}" >> $GITHUB_OUTPUT
else
echo "token=${{ secrets.GH_TOKEN }}" >> $GITHUB_OUTPUT
end
- env:
GH_TOKEN: "${{ steps.github_app_token.outputs.token }}"
if: "${{ fromJSON(needs.createRelease.outputs.draft) || !fromJSON(needs.createRelease.outputs.exists) }}"
Expand Down
1 change: 1 addition & 0 deletions workflows/build.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ local releaseLibStep = common.releaseLibStep;
common.setupNode,
common.extractBranchName,
common.githubAppToken,
common.setToken,
releaseLibStep('get release version')
+ step.withId('version')
+ step.withRun(|||
Expand Down
2 changes: 2 additions & 0 deletions workflows/release.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ local pullRequestFooter = 'Merging this PR will release the [artifacts](https://
common.googleAuth,
common.setupGoogleCloudSdk,
common.githubAppToken,
common.setToken,

// exits with code 1 if the url does not match
// meaning there are no artifacts for that sha
Expand Down Expand Up @@ -175,6 +176,7 @@ local pullRequestFooter = 'Merging this PR will release the [artifacts](https://
+ job.withSteps([
common.fetchReleaseRepo,
common.githubAppToken,
common.setToken,
releaseStep('publish release')
+ step.withIf('${{ fromJSON(needs.createRelease.outputs.draft) || !fromJSON(needs.createRelease.outputs.exists) }}')
+ step.withEnv({
Expand Down

0 comments on commit cfbefe6

Please sign in to comment.