Skip to content

Commit 26ed47c

Browse files
authored
Merge pull request #20 from mallardduck/fix-ci-bug
Add GHCR.io login step to workflows
2 parents 583e49e + 360cbce commit 26ed47c

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.github/workflows/head-build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ jobs:
7979
mkdir -p oras-install/
8080
tar -zxf oras_${VERSION}_*.tar.gz -C oras-install/
8181
oras-install/oras copy ${{ env.FULL_IMAGE_URL }}:${{ env.STATIC_TAG }} ${{ env.FULL_IMAGE_URL }}:${{ env.LATEST_TAG }}
82+
-
83+
name: Login to GitHub Container Registry
84+
uses: docker/login-action@v3
85+
with:
86+
registry: ghcr.io
87+
username: ${{ github.actor }}
88+
password: ${{ secrets.GITHUB_TOKEN }}
8289

8390
- name: Re-tag the image tags to ghcr.io/${{ github.repository_owner }}
8491
env:

.github/workflows/release-publish.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ on:
55
tags:
66
- '*'
77

8-
env:
9-
IMAGE_REPO: "rancher/kuberlr-kubectl"
10-
118
# GitHub settings / example values:
129
#
1310
# org level vars:
@@ -57,7 +54,15 @@ jobs:
5754
public-password: ${{ env.DOCKER_PASSWORD || secrets.DOCKER_PASSWORD }}
5855

5956
push-to-prime: false
60-
57+
58+
-
59+
name: Login to GitHub Container Registry
60+
uses: docker/login-action@v3
61+
with:
62+
registry: ghcr.io
63+
username: ${{ github.actor }}
64+
password: ${{ secrets.GITHUB_TOKEN }}
65+
6166
- name: Re-tag the image to ghcr.io/${{ github.repository_owner }}
6267
env:
6368
FULL_IMAGE_URL: ${{ env.PUBLIC_REGISTRY }}/${{ vars.REPO || github.repository_owner }}/${{ vars.IMAGE_NAME || 'kuberlr-kubectl' }}

0 commit comments

Comments
 (0)