Rearrange permissions section in Docker workflow for clarity

This commit is contained in:
Arunavo Ray
2025-05-18 09:52:52 +05:30
parent b2d62bd6d7
commit d7d50c5859

View File

@@ -10,14 +10,14 @@ env:
REGISTRY: ghcr.io
IMAGE: ${{ github.repository }}
permissions:
contents: write
packages: write
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
services:
redis:
image: redis:7-alpine
@@ -33,7 +33,7 @@ jobs:
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} # Replace with secrets.GHCR_PAT if using PAT
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
@@ -42,4 +42,4 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ github.sha }}
${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ github.sha }}