File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,6 +70,19 @@ inputs:
7070 required : false
7171 default : apk.cgr.dev
7272
73+ libraries-host :
74+ description : |
75+ The hostname to authenticate against for Chainguard Libraries-related
76+ authentication.
77+ required : false
78+ default : libraries.cgr.dev
79+
80+ setup-python-keyring :
81+ description : |
82+ Whether to install the Chainguard Libraries pip keyring package.
83+ required : false
84+ default : false
85+
7386runs :
7487 using : " composite"
7588
@@ -130,6 +143,13 @@ runs:
130143 fi
131144 echo "::endgroup::"
132145
146+ echo "::group::Authenticating with ${{ inputs.libraries-host }} as ${{ env.IDENTITY }}"
147+ if ! chainctl auth login --identity "${{ env.IDENTITY }}" --audience ${{ inputs.libraries-host }} -v=${{ env.VERBOSITY }}; then
148+ echo "::error Unable to assume the identity ${{ env.IDENTITY }} for ${{ inputs.libraries-host }}."
149+ exit 1
150+ fi
151+ echo "::endgroup::"
152+
133153 echo "::group::Authenticating with ${{ inputs.apk-host }} as ${{ env.IDENTITY }}"
134154 if ! chainctl auth login --identity "${{ env.IDENTITY }}" --audience ${{ inputs.apk-host }} -v=${{ env.VERBOSITY }}; then
135155 echo "::error Unable to assume the identity ${{ env.IDENTITY }} for ${{ inputs.apk-host }}."
@@ -179,3 +199,9 @@ runs:
179199 if [ "${{ env.EXPORT_AUTH }}" == "true" ]; then
180200 echo HTTP_AUTH="basic:${{ inputs.apk-host }}:user:$(chainctl auth token --audience ${{ inputs.apk-host }})" >> $GITHUB_ENV
181201 fi
202+
203+ - if : ${{ inputs.setup-python-keyring }}
204+ name : Install Python keyring package
205+ shell : bash
206+ run : |
207+ python -m pip install "keyrings-chainguard-libraries"
You can’t perform that action at this time.
0 commit comments