Skip to content

Commit

Permalink
gh-actions/github/checkout: Fix non/token auth (#902)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
phlax committed Oct 27, 2023
1 parent f66ec81 commit 6905ad6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gh-actions/github/checkout/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ runs:
- name: Fetch token for app auth
id: appauth
uses: envoyproxy/toolshed/gh-actions/appauth@actions-v0.0.23
if: ${{ inputs.app_id && inputs.app_key }}
with:
app_id: ${{ inputs.app_id }}
key: ${{ inputs.app_key }}
Expand All @@ -35,14 +36,15 @@ runs:
yaml: ${{ inputs.config || '{}' }}
- name: Add auth token to config
id: config
if: ${{ steps.appauth.outputs.token }}
uses: envoyproxy/toolshed/gh-actions/jq@actions-v0.0.23
with:
input: ${{ steps.parsed.outputs.json }}
filter: |
. + { "token": "${{ steps.appauth.outputs.token }}" }
- uses: actions/checkout@v4
name: Checkout repository
with: ${{ fromJSON(steps.config.outputs.value) }}
with: ${{ fromJSON(steps.appauth.outputs.token && steps.config.outputs.value || steps.parsed.outputs.json) }}
- name: Configure committer
if: ${{ inputs.committer-name && inputs.committer-email }}
run: |
Expand Down

0 comments on commit 6905ad6

Please sign in to comment.