mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-02-07 18:27:03 +00:00
ci: use current code for releaser-pleaser action
The previous job always used the last release version of releaser-pleaser. This caused two issues: - if new flags were added to `action.yml` since the last release, the program errored because the flags are unknown. - right after merging a release pr, the image reference was already updated, but no new container image was built yet. This fixes both issues, by using a locally built version of releaser-pleaser, which is always up-to-date and available.
This commit is contained in:
parent
1ede0bef10
commit
7d19a657e2
1 changed files with 16 additions and 0 deletions
16
.github/workflows/releaser-pleaser.yaml
vendored
16
.github/workflows/releaser-pleaser.yaml
vendored
|
|
@ -3,6 +3,7 @@ name: releaser-pleaser
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
# TODO: use pull_request_target to avoid tainting the actual release PR with code from open feature pull requests
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- edited
|
- edited
|
||||||
|
|
@ -18,6 +19,21 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version-file: go.mod
|
||||||
|
|
||||||
|
# Build container image from current commit and replace image ref in `action.yml`
|
||||||
|
# Without this, any new flags in `action.yml` would break the job in this repository until the new
|
||||||
|
# version is released. But a new version can only be released if this job works.
|
||||||
|
- uses: ko-build/setup-ko@v0.7
|
||||||
|
- run: ko build --bare --local --tags ci github.com/apricote/releaser-pleaser/cmd/rp
|
||||||
|
|
||||||
|
- run: mkdir -p .github/actions/releaser-pleaser
|
||||||
|
- run: "sed -i 's|image: .*$|image: ghcr.io/apricote/releaser-pleaser:ci|g' action.yml"
|
||||||
|
|
||||||
|
# Dogfood the action to make sure it works for users.
|
||||||
- name: releaser-pleaser
|
- name: releaser-pleaser
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue