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