Skip to content

Build release

Build release #6

Workflow file for this run

name: Build release
on:
workflow_dispatch:
inputs:
releaseType:
description: Release type
required: true
type: choice
options:
- patch
- minor
- major
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: philipparndt/get-release-number@v3
id: next
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
releaseType: ${{ github.event.inputs.releaseType }}
- uses: actions/setup-go@v5
with:
go-version: '1.23.2'
- name: Build
working-directory: app
run: |
go build .
- 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.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker container and push
id: docker_build
uses: docker/build-push-action@v6
env:
RELEASE_VERSION: ${{ steps.next.outputs.version }}
with:
context: ./app
file: ./app/Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: |
pharndt/eltakomqtt:latest
pharndt/eltakomqtt:${{env.RELEASE_VERSION}}
- uses: ncipollo/release-action@v1
with:
name: ${{ steps.next.outputs.version }}
tag: ${{ steps.next.outputs.version }}
body: |
Docker tag: `pharndt/eltakomqtt:${{ steps.next.outputs.version }}`
Changes in this Release
- Dependency update
- ...