Skip to content

Commit

Permalink
CI: GitHub Workflows security hardening
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Nov 1, 2024
1 parent 219571b commit 28dcd06
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ on:
pull_request:
branches:
- 5.x
permissions: {}
jobs:
CI:
runs-on: ${{ matrix.os }}
permissions:
contents: read
continue-on-error: ${{ matrix.libvips-version == 'master' }}
strategy:
fail-fast: true
Expand Down Expand Up @@ -85,6 +88,9 @@ jobs:
docker-publish:
needs: CI
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -114,8 +120,8 @@ jobs:
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
Expand Down

0 comments on commit 28dcd06

Please sign in to comment.