Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-actions/github/checkout: Fix non/token auth #902

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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