Merge branch 'master' into feature/pwd-from-runtime #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Docker image | |
env: | |
DOCKER_REGISTRY: ghcr.io/raalabs | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
ci: | |
name: Release | |
runs-on: ubuntu-latest | |
env: | |
RELEASE: ${{ github.event_name == 'push' && contains(inputs.branches || 'main,master', github.ref_name) }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- uses: mathieudutour/[email protected] | |
name: Calculate next version and create tag on GitHub | |
id: tag | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
release_branches: master,main | |
dry_run: ${{ env.RELEASE != 'true' }} | |
- run: git fetch --force --tags | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: raalabs-cicd | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser | |
args: release --clean --snapshot=${{ env.RELEASE != 'true' }} | |
env: | |
GORELEASER_PREVIOUS_TAG: ${{ steps.tag.outputs.previous_tag }} | |
GORELEASER_CURRENT_TAG: ${{ steps.tag.outputs.new_tag }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |