Create custom CI pipeline
This commit is contained in:
54
.woodpecker/build.yml
Normal file
54
.woodpecker/build.yml
Normal file
@@ -0,0 +1,54 @@
|
||||
matrix:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
- linux/riscv64
|
||||
|
||||
labels:
|
||||
platform: ${platform}
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: golang:1.23.6
|
||||
commands:
|
||||
- go build
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: docker
|
||||
image: woodpeckerci/plugin-kaniko
|
||||
settings:
|
||||
registry: gitea.elara.ws
|
||||
repo: elara6331/distrohop
|
||||
tags: ${platform##linux/}
|
||||
cache: true
|
||||
username: elara6331
|
||||
password:
|
||||
from_secret: registry_password
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: nfpm
|
||||
image: goreleaser/nfpm
|
||||
environment:
|
||||
ARCH: ${platform##linux/}
|
||||
VERSION: ${CI_COMMIT_TAG##v}
|
||||
commands:
|
||||
- nfpm pkg -f .nfpm.yaml -p deb -t .
|
||||
- nfpm pkg -f .nfpm.yaml -p rpm -t .
|
||||
- nfpm pkg -f .nfpm.yaml -p archlinux -t .
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: release
|
||||
image: woodpeckerci/plugin-release
|
||||
settings:
|
||||
title: "Version ${CI_COMMIT_TAG##v}"
|
||||
files:
|
||||
- '*.deb'
|
||||
- '*.rpm'
|
||||
- '*.tar.zst'
|
||||
api_key:
|
||||
from_secret: gitea_token
|
||||
when:
|
||||
event: tag
|
||||
14
.woodpecker/manifest.yml
Normal file
14
.woodpecker/manifest.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
labels:
|
||||
platform: linux/amd64
|
||||
|
||||
steps:
|
||||
- name: manifest
|
||||
image: mplatform/manifest-tool
|
||||
commands:
|
||||
- manifest-tool push from-args --platforms linux/amd64,linux/arm64,linux/riscv64 --template gitea.elara.ws/elara6331/distrohop:ARCH --tags ${CI_COMMIT_TAG} --target gitea.elara.ws/elara6331/distrohop:latest
|
||||
when:
|
||||
- event: tag
|
||||
platform: linux/amd64
|
||||
|
||||
depends_on:
|
||||
- build
|
||||
Reference in New Issue
Block a user