Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ inputs:
required: false
default: true

apk-host:
description: |
The hostname to authenticate against for APK-related authentication.
required: false
default: apk.cgr.dev

runs:
using: "composite"

Expand Down Expand Up @@ -121,16 +127,16 @@ runs:
echo Unable to assume the identity ${{ env.IDENTITY }}.
exit 1
fi
if ! chainctl auth login --identity "${{ env.IDENTITY }}" --audience apk.cgr.dev -v=${{ env.VERBOSITY }}; then
echo Unable to assume the identity ${{ env.IDENTITY }} for apk.cgr.dev.
if ! chainctl auth login --identity "${{ env.IDENTITY }}" --audience ${{ inputs.apk-host }} -v=${{ env.VERBOSITY }}; then
echo Unable to assume the identity ${{ env.IDENTITY }} for ${{ inputs.apk-host }}.
exit 1
fi
if ! chainctl auth configure-docker --identity "${{ env.IDENTITY }}" -v=${{ env.VERBOSITY }}; then
echo Unable to register credential helper as ${{ env.IDENTITY }}.
exit 1
fi
if [ "${{ env.EXPORT_AUTH }}" == "true" ]; then
echo HTTP_AUTH="basic:apk.cgr.dev:user:$(chainctl auth token --audience apk.cgr.dev)" >> $GITHUB_ENV
echo HTTP_AUTH="basic:${{ inputs.apk-host }}:user:$(chainctl auth token --audience ${{ inputs.apk-host }})" >> $GITHUB_ENV
fi

- name: Authenticate with Chainguard (DEPRECATED invite-code)
Expand Down Expand Up @@ -160,5 +166,5 @@ runs:
exit 1
fi
if [ "${{ env.EXPORT_AUTH }}" == "true" ]; then
echo HTTP_AUTH="basic:apk.cgr.dev:user:$(chainctl auth token --audience apk.cgr.dev)" >> $GITHUB_ENV
echo HTTP_AUTH="basic:${{ inputs.apk-host }}:user:$(chainctl auth token --audience ${{ inputs.apk-host }})" >> $GITHUB_ENV
fi
Loading