mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-01-13 21:21:03 +00:00
The current value caused the following error when running the action in
a different repository:
Error: 'ghcr.io/apricote/releaser-pleaser:v0.4.1' should be either '[path]/Dockerfile' or 'docker://image[:tag]'.
Not sure why this did not come up before, as we are also using the same
format for the CI in this repository, even if we use another tag.
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
name: releaser-pleaser
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
# Using pull_request_target to avoid tainting the actual release PR with code from open feature pull requests
|
|
pull_request_target:
|
|
types:
|
|
- edited
|
|
- labeled
|
|
- unlabeled
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
releaser-pleaser:
|
|
# TODO: if: push or pull_request.closed
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
|
|
with:
|
|
ref: main
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # 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@3aebd0597dc1e9d1a26bcfdb7cbeb19c131d3037 # 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: docker://ghcr.io/apricote/releaser-pleaser:ci|g' action.yml"
|
|
|
|
# Dogfood the action to make sure it works for users.
|
|
- name: releaser-pleaser
|
|
uses: ./
|
|
with:
|
|
token: ${{ secrets.RELEASER_PLEASER_TOKEN }}
|
|
extra-files: |
|
|
action.yml
|
|
templates/run.yml
|