Merge pull request #371 from databacker/dependabot/go_modules/google.… #17
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: | |
tags: | |
- 'v*' | |
env: | |
IMAGE_NAME: databack/mysql-backup | |
jobs: | |
report: | |
name: Report | |
runs-on: ubuntu-latest | |
steps: | |
- name: ref | |
run: echo ${{ github.ref }} | |
- name: event_name | |
run: echo ${{ github.event_name }} | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
- name: Build for all platforms | |
run: | | |
make build-all | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
dist/* | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
${{env.IMAGE_NAME}} | |
# generate Docker tags based on the following events/attributes | |
# for any semver, including rc and alpha, etc. take the tag as is | |
# for ones that are exactly X.Y.Z, also tag it as latest | |
tags: | | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}}.{{patch}},value=latest | |
- name: Build and push semver tag | |
id: docker_build_push_semver | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
${{ steps.meta.outputs.tags }} |