Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Merge pull request #23 from lmilbaum/fix
Browse files Browse the repository at this point in the history
ghcr.io permissions
  • Loading branch information
lmilbaum authored Dec 28, 2023
2 parents a452a45 + bc01bac commit 69eaa73
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/build-and-push-cloud-qcow2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ env:
# TODO use quay once it supports artifacts
DISKIMAGE_REGISTRY: ghcr.io

permissions:
contents: read
packages: write

jobs:
build-and-push-cloud-qcow2-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

strategy:
matrix:
Expand Down Expand Up @@ -46,8 +45,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Login to quay.io
run: podman login --authfile auth.json -u ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} ${{ env.DISKIMAGE_REGISTRY }}
# - name: Login to quay.io
# run: podman login --authfile auth.json -u ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} ${{ env.DISKIMAGE_REGISTRY }}
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Build
run: |
Expand All @@ -69,5 +70,6 @@ jobs:
- name: Push
run: |
oras push --debug --registry-config auth.json ${{ env.DISKIMAGE_REGISTRY }}/${{ github.actor }}/${{ matrix.os }}-bootc-cloud-disk:${{ matrix.tag }} \
oras push --debug --registry-config auth.json \
${{ DISKIMAGE_REGISTRY }}/${{ github.repository_owner }}/${{ matrix.os }}-bootc-cloud-disk:${{ matrix.tag }} \
${{ matrix.os }}-bootc-cloud-${{ matrix.tag }}.qcow2.zst:application/x-qemu-qcow2+zstd

0 comments on commit 69eaa73

Please sign in to comment.