Skip to content

Commit 313fa6d

Browse files
authored
Fix Push image (#8)
* Push image * Test permissions
1 parent 45f5888 commit 313fa6d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/container-image.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
- main
1515
- release-*
1616

17+
permissions:
18+
contents: write
19+
packages: write
20+
1721
jobs:
1822
image:
1923
name: build image
@@ -28,18 +32,18 @@ jobs:
2832
images: ghcr.io/ionos-cloud/cluster-api-provider-proxmox
2933

3034
- name: Login to GitHub Container Registry
31-
if: github.event_name != 'pull_request'
35+
# if: github.event_name != 'pull_request'
3236
uses: docker/login-action@v3
3337
with:
3438
registry: ghcr.io
35-
username: ${{ secrets.BOT_USERNAME }}
36-
password: ${{ secrets.BOT_PAT }}
39+
username: ${{ github.actor }}
40+
password: ${{ secrets.GITHUB_TOKEN }}
3741

3842
- name: Build and push Docker image
3943
uses: docker/build-push-action@v5
4044
with:
4145
context: .
42-
push: ${{ github.event_name != 'pull_request' }}
46+
push: true
4347
tags: ${{ steps.meta.outputs.tags }}
4448
labels: ${{ steps.meta.outputs.labels }}
4549

0 commit comments

Comments
 (0)