Skip to content

Specify the path for building the Go binary in the release workflow #7

Specify the path for building the Go binary in the release workflow

Specify the path for building the Go binary in the release workflow #7

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Runner Docker Image
run: docker build . --file Dockerfile --tag justnz/alertflow-runner:latest --tag justnz/alertflow-runner:${{ github.sha }} --tag justnz/alertflow-runner:${{ github.ref_name }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Docker Images
run: |
docker push justnz/alertflow-runner:latest
docker push justnz/alertflow-runner:${{ github.sha }}
docker push justnz/alertflow-runner:${{ github.ref_name }}
- uses: actions/setup-go@v2
with:
go-version: '1.23'
- name: Build go binary
run: go build -o alertflow-runner ./cmd/alertflow-runner
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
artifacts: alertflow-runner
skipIfReleaseExists: true
generateReleaseNotes: true