Skip to content

readme

readme #16

Workflow file for this run

name: Release
on:
push:
branches: [ "main" ]
jobs:
build:
name: Build, Test & Push to Docker
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: next_version
uses: zwaldowski/semver-release-action@v3
with:
dry_run: false
prefix: v
bump: minor
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: |
echo "version: ${{ steps.next_version.outputs.version }}"
echo "version tag: ${{ steps.next_version.outputs.version_tag }}"
echo "${{ steps.next_version.outputs.version }}" > version.txt
- uses: actions/setup-go@v4
with:
go-version: '>=1.20'
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push images to DockerHub
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64, linux/arm64/v8, linux/arm/v7
tags: legobas/mqtt4rclone:latest,legobas/mqtt4rclone:${{ steps.next_version.outputs.version }}