Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

BuildAndPublish

BuildAndPublish #10

name: BuildAndPublish
on:
workflow_dispatch:
inputs:
version:
description: Version to publish
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20.0'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install dependencies
run: go mod tidy
- name: Test with the Go CLI
run: make test
- name: Build binary
run: go build -o server cmd/server/server.go
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker image
run: |
docker buildx build --push \
--tag bastibast/athene-events-reminder:${{ github.event.inputs.version }} \
--platform linux/amd64,linux/arm/v7,linux/arm64 .