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

CI: Use GitHub Container Registry for CI images #3429

Closed
wants to merge 5 commits into from
Closed
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ jobs:
echo "BRANCH_REF=$(echo '${{ github.ref }}' | sed -E 's/[^A-Za-z0-9]+/-/g')" >> $GITHUB_ENV
echo "BASE_IMAGE=ubuntu:18.04" >> $GITHUB_ENV
echo "CORE_IMAGE=dependabot/dependabot-core" >> $GITHUB_ENV
echo "CORE_CI_IMAGE=dependabot/dependabot-core-ci" >> $GITHUB_ENV
echo "CORE_CI_IMAGE=ghcr.io/${{ github.repository_owner }}/dependabot-core/dependabot-core-ci" >> $GITHUB_ENV
- name: Log in to Docker registry
run: |
if [ -n "${{ secrets.DOCKER_USERNAME }}" ] && [ -n "${{ secrets.DOCKER_PASSWORD }}" ]; then
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
echo "DOCKER_LOGGED_IN=true" >> $GITHUB_ENV
else
if [[ -z "${{ secrets.GHCR_PAT }}" ]]; then
echo "No Docker credentials, skipping login"
else
echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: could this be secrets.GITHUB_TOKEN? https://github.blog/changelog/2021-03-24-packages-container-registry-now-supports-github_token/

It looks like you may have started there and fell back to a PAT.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: who does this PAT belong to? It may be worth documenting here so access can be managed.

echo "DOCKER_LOGGED_IN=true" >> $GITHUB_ENV
fi
- name: Set test env credentials
run: |
Expand Down