chore(deps): bump docker/build-push-action from 5 to 6 #74
Workflow file for this run
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 | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*.*.*' | |
pull_request: | |
types: | |
- labeled | |
jobs: | |
release: | |
if: github.event.action != 'labeled' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Bump version on merging Pull Requests with specific labels | |
id: bumpr | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
uses: haya14busa/action-bumpr@v1 | |
- name: Update corresponding major and minor tag | |
uses: haya14busa/action-update-semver@v1 | |
if: "!steps.bumpr.outputs.skip" | |
with: | |
tag: ${{ steps.bumpr.outputs.next_version }} | |
- name: Get tag name | |
id: tag | |
uses: haya14busa/action-cond@v1 | |
with: | |
cond: "${{ startsWith(github.ref, 'refs/tags/') }}" | |
if_true: ${{ github.ref }} | |
if_false: ${{ steps.bumpr.outputs.next_version }} | |
- id: version_tag | |
run: echo "::set-output name=tag::$(echo ${{steps.tag.outputs.value}} | cut -c 2-)" | |
- name: Create release | |
uses: shogo82148/actions-create-release@v1 | |
if: "steps.tag.outputs.value != ''" | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
tag_name: ${{ steps.tag.outputs.value }} | |
release_name: Release ${{ steps.tag.outputs.value }} | |
body: ${{ steps.bumpr.outputs.message }} | |
draft: false | |
prerelease: false | |
- uses: actions/setup-go@v5 | |
if: "steps.tag.outputs.value != ''" | |
with: | |
go-version: '>=1.18.0' | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
if: "steps.tag.outputs.value != ''" | |
with: | |
username: ${{secrets.DOCKERHUB_USERNAME}} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
if: "steps.tag.outputs.value != ''" | |
with: | |
platform: linux/amd64,linux/arm64,linux/arm/v7 | |
push: true | |
tags: jplanckeel/scope:${{steps.version_tag.outputs.tag}},jplanckeel/scope:latest | |
- name: Run GoReleaser | |
if: "steps.tag.outputs.value != ''" | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release-check: | |
if: github.event.action == 'labeled' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Post bumpr status comment | |
uses: haya14busa/action-bumpr@v1 |