Skip to content

Commit

Permalink
Merge pull request #20 from mallardduck/fix-ci-bug
Browse files Browse the repository at this point in the history
Add GHCR.io login step to workflows
  • Loading branch information
mallardduck authored Nov 8, 2024
2 parents 583e49e + 360cbce commit 26ed47c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/head-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ jobs:
mkdir -p oras-install/
tar -zxf oras_${VERSION}_*.tar.gz -C oras-install/
oras-install/oras copy ${{ env.FULL_IMAGE_URL }}:${{ env.STATIC_TAG }} ${{ env.FULL_IMAGE_URL }}:${{ env.LATEST_TAG }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Re-tag the image tags to ghcr.io/${{ github.repository_owner }}
env:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
tags:
- '*'

env:
IMAGE_REPO: "rancher/kuberlr-kubectl"

# GitHub settings / example values:
#
# org level vars:
Expand Down Expand Up @@ -57,7 +54,15 @@ jobs:
public-password: ${{ env.DOCKER_PASSWORD || secrets.DOCKER_PASSWORD }}

push-to-prime: false


-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Re-tag the image to ghcr.io/${{ github.repository_owner }}
env:
FULL_IMAGE_URL: ${{ env.PUBLIC_REGISTRY }}/${{ vars.REPO || github.repository_owner }}/${{ vars.IMAGE_NAME || 'kuberlr-kubectl' }}
Expand Down

0 comments on commit 26ed47c

Please sign in to comment.