37 lines
912 B
YAML
37 lines
912 B
YAML
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
release:
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '^1.23'
|
|
- name: go get
|
|
run: |
|
|
go get
|
|
mkdir dist
|
|
- name: Building for Linux
|
|
env:
|
|
GOOS: linux
|
|
GOARCH: amd64
|
|
run: go build -v -o dist/machinelock-manager-linux-amd64
|
|
- name: forgejo release
|
|
uses: actions/forgejo-release@v2.6.2
|
|
with:
|
|
direction: upload
|
|
release-dir: dist
|
|
- name: login to docker hub
|
|
uses: https://github.com/docker/login-action@v3
|
|
with:
|
|
username: ctdo
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
- name: build docker image
|
|
uses: https://github.com/docker/build-push-action@v6
|
|
with:
|
|
push: true
|
|
tags: ctdo/machinelock-manager:latest
|
|
|