Skip to content

Commit

Permalink
ci(docker-publish): limit workflow triggers (juicity#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
piyoki authored Oct 22, 2023
1 parent ac441da commit f688158
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,40 @@ on:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*' ]
paths:
- "**/*.go"
- "**/*.c"
- "**/*.h"
- "go.mod"
- "go.sum"
- ".github/workflows/pr-build.yml"
- ".github/workflows/seed-build.yml"
pull_request:
branches: [ "main" ]
paths:
- "**/*.go"
- "**/*.c"
- "**/*.h"
- "go.mod"
- "go.sum"
- ".github/workflows/pr-build.yml"
- ".github/workflows/seed-build.yml"

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down

0 comments on commit f688158

Please sign in to comment.