Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
9885585516 | |||
b8b0bc8f65 |
2 changed files with 43 additions and 41 deletions
41
.drone.yml
41
.drone.yml
|
@ -1,41 +0,0 @@
|
|||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
|
||||
steps:
|
||||
- name: go get
|
||||
image: golang
|
||||
commands:
|
||||
- go get
|
||||
- mkdir dist
|
||||
- name: Building for Linux
|
||||
image: golang
|
||||
environment:
|
||||
GOOS: linux
|
||||
GOARCH: amd64
|
||||
commands:
|
||||
- go build -v -o dist/machinelock-manager-linux-amd64
|
||||
- name: gitea release
|
||||
image: plugins/gitea-release
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: token
|
||||
base_url: https://git.ctdo.de
|
||||
files: dist/*
|
||||
checksum:
|
||||
- md5
|
||||
- sha1
|
||||
- sha256
|
||||
- name: build docker image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username: ctdo
|
||||
password:
|
||||
from_secret: dockerhub_password
|
||||
repo: ctdo/machinelock-manager
|
||||
tags: latest
|
||||
|
43
.forgejo/workflows/release.yaml
Normal file
43
.forgejo/workflows/release.yaml
Normal file
|
@ -0,0 +1,43 @@
|
|||
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: Docker CLI installation
|
||||
run: |
|
||||
apt update
|
||||
apt install -y ca-certificates curl
|
||||
curl -fsSL https://get.docker.com -o get-docker.sh
|
||||
sh get-docker.sh
|
||||
- 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
|
||||
|
Loading…
Add table
Reference in a new issue