Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@ on:
- master

jobs:
changes:
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src:
- '.github/release-drafter.yml'
- '.github/workflows/draft-release.yml'
- '.github/workflows/pr-build.yml'
- '.github/workflows/release.yml'
- '.github/workflows/reusable-docker-build.yml'
- 'pkg/**'
- 'main.go'
- 'go.*'
- 'Dockerfile'
- '.dockerignore'

update_release_draft:
runs-on: ubuntu-latest
permissions:
Expand All @@ -17,3 +41,28 @@ jobs:
config-name: release-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

prepare-tags:
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
permissions: {}
outputs:
tags: ${{ steps.prep.outputs.tags }}
steps:
- name: Prepare image tags
id: prep
run: |
REPO=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
echo "tags=ghcr.io/$REPO:dev" >> $GITHUB_OUTPUT

build-image:
needs: prepare-tags
permissions:
contents: read
packages: write
attestations: write
id-token: write
uses: ./.github/workflows/reusable-docker-build.yml
with:
tags: ${{ needs.prepare-tags.outputs.tags }}
Loading