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
@@ -111,6 +124,12 @@ runs:
111124 chmod +x ./${out}
112125 echo "$(pwd)" >> $GITHUB_PATH
113126
127+ - if : ${{ inputs.setup-python-keyring }}
128+ name : Install Python keyring package
129+ shell : bash
130+ run : |
131+ python -m pip install "keyrings-chainguard-libraries"
132+
114133 - name : Authenticate with Chainguard (assumed identity)
115134 shell : bash
116135 if : ${{ inputs.identity != '' }}
@@ -130,6 +149,13 @@ runs:
130149 fi
131150 echo "::endgroup::"
132151
152+ echo "::group::Authenticating with ${{ inputs.libraries-host }} as ${{ env.IDENTITY }}"
153+ if ! chainctl auth login --identity "${{ env.IDENTITY }}" --audience ${{ inputs.libraries-host }} -v=${{ env.VERBOSITY }}; then
154+ echo "::error Unable to assume the identity ${{ env.IDENTITY }} for ${{ inputs.libraries-host }}."
155+ exit 1
156+ fi
157+ echo "::endgroup::"
158+
133159 echo "::group::Authenticating with ${{ inputs.apk-host }} as ${{ env.IDENTITY }}"
134160 if ! chainctl auth login --identity "${{ env.IDENTITY }}" --audience ${{ inputs.apk-host }} -v=${{ env.VERBOSITY }}; then
135161 echo "::error Unable to assume the identity ${{ env.IDENTITY }} for ${{ inputs.apk-host }}."
You can’t perform that action at this time.
0 commit comments