Skip to content

Commit fece15a

Browse files
committed
chore(ci): fix quay.io auth for rootful podman in build-notebooks workflow
- Updated podman login to use `--authfile` for merging credentials into the client-side auth.json. - Added step to copy auth.json to root's config for server-side podman builds requiring private image pulls.
1 parent a97f7f2 commit fece15a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/build-notebooks-TEMPLATE.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,15 @@ jobs:
214214
echo "AIPCC_QUAY_BOT_USERNAME is not set, skipping login"
215215
exit 0
216216
fi
217-
echo "${{ secrets.AIPCC_QUAY_BOT_PASSWORD }}" | podman login quay.io/aipcc -u "${{ secrets.AIPCC_QUAY_BOT_USERNAME }}" --password-stdin
217+
218+
# Use --authfile to merge aipcc creds into the same file as pull-secret creds
219+
echo "${{ secrets.AIPCC_QUAY_BOT_PASSWORD }}" | podman login --authfile "$HOME/.config/containers/auth.json" quay.io/aipcc -u "${{ secrets.AIPCC_QUAY_BOT_USERNAME }}" --password-stdin
220+
221+
# The rootful podman server (behind CONTAINER_HOST) performs the actual build and
222+
# needs credentials to pull private base images. The remote API doesn't reliably
223+
# forward client-side auth for FROM image pulls, so copy auth to root's config.
224+
sudo mkdir -p /root/.config/containers/
225+
sudo cp "$HOME/.config/containers/auth.json" /root/.config/containers/auth.json
218226
219227
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
220228
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request

0 commit comments

Comments
 (0)