ci: update CI builds

This commit is contained in:
Adora Laura Kalb 2024-11-05 11:57:30 +01:00
parent 07923d8d6d
commit 50b72241f7
Signed by: adoralaura
SSH key fingerprint: SHA256:3XrkbR8ikAZJVtYfaUliX1MhmJYVAe/ocIb/MiDHBJ8
4 changed files with 52 additions and 49 deletions

View file

@ -15,13 +15,13 @@ depends_on:
- lint - lint
steps: steps:
build: - name: build-and-upload
secrets: secrets:
- FORGEJO_APIKEY - FORGEJO_APIKEY
image: golang:1.20-alpine image: golang:1.20-alpine
environment: environment:
- APP_NAME=humble-bot APP_NAME: humble-bot
- FORGE=https://git.lauka.net FORGE: https://git.lauka.net
commands: commands:
- apk add --update --no-cache xz curl jq - apk add --update --no-cache xz curl jq
- go mod download - go mod download
@ -57,4 +57,4 @@ steps:
--header "Authorization: token $FORGEJO_APIKEY" \ --header "Authorization: token $FORGEJO_APIKEY" \
--header 'Content-Type: multipart/form-data' -s -S \ --header 'Content-Type: multipart/form-data' -s -S \
--form "attachment=@$APP_NAME-${CI_COMMIT_TAG##v}-${GOOS}-${GOARCH}${GOARM}.xz.sha256;type=application/octet-stream" \ --form "attachment=@$APP_NAME-${CI_COMMIT_TAG##v}-${GOOS}-${GOARCH}${GOARM}.xz.sha256;type=application/octet-stream" \
--fail-with-body --fail-with-body

View file

@ -1,30 +0,0 @@
steps:
docker-deploy-push:
when:
- event: push
branch: main
image: woodpeckerci/plugin-docker-buildx
settings:
dockerfile: Dockerfile
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
repo: git.lauka.net/lauralani/humble-bot
registry: codeberg.org
tags: latest
username: lauralani
password:
from_secret: FORGEJO_APIKEY
docker-deploy-tag:
when:
event:
- tag
image: woodpeckerci/plugin-docker-buildx
settings:
dockerfile: Dockerfile
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
repo: git.lauka.net/lauralani/humble-bot
registry: codeberg.org
auto_tag: true
username: lauralani
password:
from_secret: FORGEJO_APIKEY

View file

@ -0,0 +1,48 @@
steps:
- name: docker-deploy-push
depends_on:
- lint
when:
- event: push
branch: main
image: woodpeckerci/plugin-docker-buildx
settings:
dockerfile: Dockerfile
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
repo: adoralaura/humble-bot
registry: https://index.docker.io/v1/
tags: latest
username: adoralaura
password:
from_secret: dockerhub_token
- name: docker-deploy-tag
when:
- event: tag
image: woodpeckerci/plugin-docker-buildx
settings:
dockerfile: Dockerfile
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
repo: adoralaura/humble-bot
registry: https://index.docker.io/v1/
auto_tag: true
username: adoralaura
password:
from_secret: dockerhub_token
- name: docker-deploy-unstable
depends_on:
- lint
when:
- event: push
branch: main
image: woodpeckerci/plugin-docker-buildx
settings:
dockerfile: Dockerfile
platforms: linux/arm64/v8,linux/amd64
repo: adoralaura/humble-bot
registry: https://index.docker.io/v1/
tags: unstable
username: adoralaura
password:
from_secret: dockerhub_token

View file

@ -1,15 +0,0 @@
steps:
docker-deploy-unstable:
when:
- event: push
branch: main
image: woodpeckerci/plugin-docker-buildx
settings:
dockerfile: Dockerfile
platforms: linux/arm64/v8,linux/amd64
repo: adoralaura/humble-bot
registry: https://index.docker.io/v1/
tags: unstable
username: adoralaura
password:
from_secret: dockerhub_token