Skip to content

Commit 46d6c9f

Browse files
committed
Authenticate to ghcr.io/appscode with GitHub App token
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent e855cfb commit 46d6c9f

1 file changed

Lines changed: 28 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,41 @@ jobs:
4141
- name: Set up Docker Buildx
4242
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
4343

44+
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3
45+
id: app-token
46+
with:
47+
client-id: ${{ secrets.GHCRX_APP_CLIENT_ID }}
48+
private-key: ${{ secrets.GHCRX_APP_PRIVATE_KEY }}
49+
owner: appscode
50+
51+
- name: Login to GitHub Container Registry
52+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
53+
with:
54+
registry: ghcr.io
55+
username: ${{ steps.app-token.outputs.app-slug }}[bot]
56+
password: ${{ steps.app-token.outputs.token }}
57+
4458
- name: Publish to GitHub Container Registry
4559
env:
4660
REGISTRY: ghcr.io/appscode
47-
DOCKER_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
48-
USERNAME: 1gtm
4961
APPSCODE_ENV: prod
5062
run: |
51-
docker login ghcr.io --username ${USERNAME} --password ${DOCKER_TOKEN}
5263
make release
5364
65+
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3
66+
id: app-token
67+
with:
68+
client-id: ${{ secrets.GHCRX_APP_CLIENT_ID }}
69+
private-key: ${{ secrets.GHCRX_APP_PRIVATE_KEY }}
70+
owner: appscode
71+
72+
- name: Login to GitHub Container Registry
73+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
74+
with:
75+
registry: ghcr.io
76+
username: ${{ steps.app-token.outputs.app-slug }}[bot]
77+
password: ${{ steps.app-token.outputs.token }}
78+
5479
- name: Publish to Red Hat Ecosystem Catalog
5580
env:
5681
REGISTRY: ghcr.io/appscode

0 commit comments

Comments
 (0)