ci(docker): don't supply permissions unless needed #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker | ||
on: | ||
schedule: | ||
- cron: "15 14 * * *" | ||
push: | ||
paths: | ||
- "Dockerfile" | ||
- "src/**" | ||
- "Cargo.lock" | ||
- "Cargo.toml" | ||
- ".dockerignore" | ||
- ".github/workflows/docker.yml" | ||
branches: ["main", "staging"] | ||
# Publish semver tags as releases. | ||
tags: ["v*.*.*"] | ||
pull_request: | ||
branches: ["main"] | ||
workflow_dispatch: | ||
jobs: | ||
docker: | ||
uses: FyraLabs/actions/.github/workflows/docker.yml@main | ||
with: | ||
publish: ${{ github.event_name != 'pull_request' }} | ||
permissions: | ||
contents: read | ||
packages: ${{ github.event_name != 'pull_request' && 'write' || 'none' }} | ||
Check failure on line 28 in .github/workflows/docker.yml GitHub Actions / DockerInvalid workflow file
|
||
# This is used to complete the identity challenge | ||
# with sigstore/fulcio when running outside of PRs. | ||
id-token: ${{ github.event_name != 'pull_request' && 'write' || 'none' }} |