chore: test global permissions

This commit is contained in:
C4illin
2025-08-03 21:15:04 +02:00
parent 068d9b8716
commit 93fbdbe0f3

View File

@@ -12,12 +12,15 @@ on:
env:
IMAGE_NAME: ${{ github.repository }}
DOCKERHUB_USERNAME: c4illin
GHCR_USERNAME: c4illin
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
packages: write
jobs:
# The build job builds the Docker image for each platform specified in the matrix.
build:
@@ -33,7 +36,7 @@ jobs:
packages: write
attestations: write
checks: write
actions: read
actions: write
runs-on: ${{ matrix.platform == 'linux/amd64' && 'ubuntu-24.04' || matrix.platform == 'linux/arm64' && 'ubuntu-24.04-arm' }}
@@ -73,8 +76,8 @@ jobs:
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ env.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push by digest
id: build
@@ -142,8 +145,8 @@ jobs:
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ env.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3