fix: updated publish pipeline (#3)
Some checks failed
CI Workflow / Check GoReleaser config (push) Has been skipped
CI Workflow / CI (push) Failing after 2m1s
CI Workflow / Code coverage report (push) Has been skipped
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 28s
Publish / Publish provider (push) Failing after 2m5s

## Description

<!-- **Please link some issue here describing what you are trying to achieve.**

In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->

relates to #1234

## Checklist

- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)

Reviewed-on: #3
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
This commit is contained in:
Marcel_Henselin 2026-01-29 10:35:33 +00:00 committed by Marcel_Henselin
parent 4eff763519
commit 4cc801a7f3
Signed by: tf-provider.git.onstackit.cloud
GPG key ID: 6D7E8A1ED8955A9C

View file

@ -1,7 +1,6 @@
name: Publish
on:
pull_request:
workflow_dispatch:
push:
tags:
@ -15,7 +14,7 @@ env:
jobs:
config:
name: Check GoReleaser config
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -28,7 +27,7 @@ jobs:
publish:
name: "Publish provider"
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
needs: config
runs-on: ubuntu-latest
permissions:
@ -81,6 +80,7 @@ jobs:
gpg --import private.key
- name: Run GoReleaser
if: github.event_name == 'workflow_dispatch'
id: goreleaser
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -89,6 +89,16 @@ jobs:
with:
args: release --skip publish --clean --snapshot
- name: Run GoReleaser
if: github.event_name != 'workflow_dispatch'
id: goreleaser
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
uses: goreleaser/goreleaser-action@v6
with:
args: release --skip publish --clean
- name: Prepare key file
run: |
echo $(echo ${{ secrets.KEY_FILE_B64 }} | base64 -d) >public_key.pem