2024-04-02 14:00:21 +13:00
|
|
|
variables:
|
2024-04-02 14:40:42 +13:00
|
|
|
- &platforms 'linux/arm64,linux/amd64'
|
2024-04-02 14:00:21 +13:00
|
|
|
- &docker_creds
|
|
|
|
|
username:
|
|
|
|
|
from_secret: hub_username_cybercinch
|
|
|
|
|
password:
|
|
|
|
|
from_secret: docker_password_cybercinch
|
|
|
|
|
- &pypi_creds
|
|
|
|
|
username:
|
|
|
|
|
from_secret: hub_username_cybercinch
|
|
|
|
|
password:
|
|
|
|
|
from_secret: docker_password_cybercinch
|
2024-04-03 10:36:21 +13:00
|
|
|
- build_args: &build_args
|
|
|
|
|
- TAG: ${CI_COMMIT_TAG}
|
2024-04-02 15:04:01 +13:00
|
|
|
clone:
|
|
|
|
|
git:
|
2024-04-02 15:16:54 +13:00
|
|
|
image: woodpeckerci/plugin-git
|
2024-04-02 15:04:01 +13:00
|
|
|
settings:
|
|
|
|
|
partial: false
|
2024-04-02 15:22:08 +13:00
|
|
|
tags: true
|
|
|
|
|
|
2024-04-02 14:00:21 +13:00
|
|
|
steps:
|
|
|
|
|
build-release:
|
|
|
|
|
image: docker.io/cybercinch/go-semrelease:golang1.20
|
|
|
|
|
pull: true
|
|
|
|
|
commands:
|
|
|
|
|
- >
|
|
|
|
|
GOOS=linux
|
|
|
|
|
GOARCH=amd64
|
|
|
|
|
CGO_ENABLED=0
|
2024-04-02 22:11:58 +13:00
|
|
|
go build -o build/go-semantic-release.linux_amd64 -ldflags "-w -s --X main.version=`go-semantic-release next`"
|
2024-04-02 14:00:21 +13:00
|
|
|
./cmd/go-semantic-release/
|
|
|
|
|
- >
|
|
|
|
|
GOOS=linux
|
|
|
|
|
GOARCH=arm64
|
|
|
|
|
CGO_ENABLED=0
|
|
|
|
|
go build -o build/go-semantic-release.linux_arm64 -ldflags "-w -s --X main.version=`go-semantic-release next`"
|
|
|
|
|
./cmd/go-semantic-release/
|
|
|
|
|
- >
|
|
|
|
|
GOOS=windows
|
|
|
|
|
GOARCH=386
|
|
|
|
|
CGO_ENABLED=0
|
|
|
|
|
go build -o build/go-semantic-release.windows_i386.exe -ldflags "-w -s -X main.version=`go-semantic-release next`"
|
|
|
|
|
./cmd/go-semantic-release/
|
|
|
|
|
- >
|
|
|
|
|
GOOS=windows
|
|
|
|
|
GOARCH=amd64
|
|
|
|
|
CGO_ENABLED=0
|
2024-04-02 22:11:58 +13:00
|
|
|
go build -o build/go-semantic-release.windows_amd64.exe -ldflags "-w -s -X main.version=`go-semantic-release next`"
|
2024-04-02 14:00:21 +13:00
|
|
|
./cmd/go-semantic-release/
|
|
|
|
|
- >
|
|
|
|
|
GOOS=darwin
|
|
|
|
|
GOARCH=amd64
|
|
|
|
|
CGO_ENABLED=0
|
2024-04-02 22:11:58 +13:00
|
|
|
go build -o build/go-semantic-release.darwin_amd64 -ldflags "-w -s -X main.version=`go-semantic-release next`"
|
2024-04-02 14:00:21 +13:00
|
|
|
./cmd/go-semantic-release/
|
2024-04-02 14:40:42 +13:00
|
|
|
- go-semantic-release --loglevel debug release # Actually make the release on Gitea. Uploading assets
|
2024-04-02 14:00:21 +13:00
|
|
|
environment:
|
|
|
|
|
GITEA_TOKEN:
|
|
|
|
|
from_secret: gitea_token
|
2024-04-02 14:53:30 +13:00
|
|
|
GITEA_URL:
|
|
|
|
|
from_secret: gitea_server_url
|
2024-04-02 14:00:21 +13:00
|
|
|
when:
|
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
|
event:
|
|
|
|
|
- push
|
|
|
|
|
- manual
|
|
|
|
|
|
2024-04-02 22:11:58 +13:00
|
|
|
publish-docker-tagged:
|
2024-04-03 10:36:21 +13:00
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
2024-04-02 22:11:58 +13:00
|
|
|
pull: true
|
|
|
|
|
settings:
|
|
|
|
|
<<: *docker_creds
|
|
|
|
|
token:
|
|
|
|
|
from_secret: depot_token
|
2024-04-03 10:36:21 +13:00
|
|
|
registry: hub.cybercinch.nz
|
2024-04-02 22:11:58 +13:00
|
|
|
repo: cybercinch/${CI_REPO_NAME}
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
platforms: *platforms
|
2024-04-03 10:36:21 +13:00
|
|
|
build_args:
|
2024-04-03 10:43:51 +13:00
|
|
|
- TAG=${CI_COMMIT_TAG}
|
2024-04-02 23:22:24 +13:00
|
|
|
tags:
|
2024-04-03 10:36:21 +13:00
|
|
|
- latest
|
2024-04-02 23:22:24 +13:00
|
|
|
- ${CI_COMMIT_TAG}
|
2024-04-03 10:55:11 +13:00
|
|
|
logins:
|
|
|
|
|
- registry: https://hub.cybercinch.nz/
|
|
|
|
|
username: cybercinch
|
|
|
|
|
password:
|
|
|
|
|
from_secret: docker_password_cybercinch
|
2024-04-02 22:11:58 +13:00
|
|
|
when:
|
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
|
event:
|
|
|
|
|
- tag
|
2024-04-02 14:00:21 +13:00
|
|
|
|
|
|
|
|
publish-docker-develop:
|
|
|
|
|
image: docker.io/cybercinch/woodpecker-plugin-depot
|
|
|
|
|
pull: true
|
|
|
|
|
settings:
|
|
|
|
|
<<: *docker_creds
|
|
|
|
|
token:
|
|
|
|
|
from_secret: depot_token
|
|
|
|
|
repohost: hub.cybercinch.nz
|
|
|
|
|
repo: cybercinch/${CI_REPO_NAME}
|
|
|
|
|
project:
|
|
|
|
|
from_secret: depot_project
|
2024-04-02 14:14:05 +13:00
|
|
|
dockerfile: Dockerfile.dev
|
2024-04-02 14:00:21 +13:00
|
|
|
push: true
|
2024-04-02 14:06:33 +13:00
|
|
|
platforms: linux/amd64
|
2024-04-02 14:00:21 +13:00
|
|
|
tags: ["develop"]
|
|
|
|
|
when:
|
|
|
|
|
branch: develop
|
|
|
|
|
event:
|
|
|
|
|
- push
|
|
|
|
|
- manual
|