Files
terraform-docs/.github/workflows/prerelease.yaml
dependabot[bot] db5e64cedb Bump goreleaser/goreleaser-action from 5 to 6
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 5 to 6.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-05 06:40:05 +00:00

72 lines
1.8 KiB
YAML

name: prerelease
on:
push:
tags:
- "v*.*.*-*"
env:
GO_VERSION: "1.22.3"
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
jobs:
prerelease:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
if: env.REGISTRY_USERNAME != ''
with:
distribution: goreleaser
version: 1.26.2
args: release --clean --skip=publish --skip=sign
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/terraform-docs-v*
draft: false
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
docker:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set version output
id: vars
run: echo "release_tag=${GITHUB_REF:11}" >> "$GITHUB_ENV" # tag name without leading 'v'
- name: Login to Docker
uses: docker/login-action@v3
if: env.REGISTRY_USERNAME != ''
with:
registry: quay.io
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push Docker image
run: make docker push
env:
DOCKER_TAG: ${{ env.release_tag }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}