Chore: replace woodpecker with forgejo actions

This commit is contained in:
Melora Hugues 2024-08-10 16:01:31 +02:00
parent 0fc6a4b093
commit 1e76dca0a9
6 changed files with 74 additions and 70 deletions

View file

@ -0,0 +1,21 @@
on:
push:
branches:
- "main"
jobs:
docker-build-push:
runs-on: cth-ubuntu-latest
steps:
- name: set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: login to repository
uses: docker/login-action@v3
with:
registry: git.faercol.me
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: build and push image
uses: docker/build-push-action@v6
with:
push: true
tags: git.faercol.me/polyculeconnect/polyculeconnect:latest

View file

@ -0,0 +1,21 @@
on:
push:
tags:
- "**"
jobs:
docker-build-push:
runs-on: cth-ubuntu-latest
steps:
- name: set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: login to repository
uses: docker/login-action@v3
with:
registry: git.faercol.me
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: build and push image
uses: docker/build-push-action@v6
with:
push: true
tags: git.faercol.me/polyculeconnect/polyculeconnect:${{ gitea.ref_name }}

View file

@ -0,0 +1,16 @@
on:
push:
branches:
- "**"
- "!main"
jobs:
docker-build-only:
runs-on: cth-ubuntu-latest
steps:
- name: set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: build image (build only)
uses: docker/build-push-action@v6
with:
push: false
tags: git.faercol.me/polyculeconnect/polyculeconnect

View file

@ -0,0 +1,16 @@
on:
push:
branches:
- "**"
jobs:
go-test:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Run unit tests
run: make -C polyculeconnect test
- name: Build go package
run: make -C polyculeconnect build

View file

@ -1,57 +0,0 @@
steps:
docker-build-only:
image: woodpeckerci/plugin-docker-buildx
privileged: true
settings:
repo: git.faercol.me/polyculeconnect/polyculeconnect
tags: latest
dry_run: true
platforms:
- linux/amd64
# - linux/arm64
when:
- event: pull_request
- event: push
branch:
exclude: [main]
docker-build-push:
image: woodpeckerci/plugin-docker-buildx
privileged: true
settings:
repo: git.faercol.me/polyculeconnect/polyculeconnect
registry: git.faercol.me
tags: latest
username:
from_secret: git_username
password:
from_secret: git_password
platforms:
- linux/amd64
# - linux/arm64
when:
- event: push
branch: main
docker-push-tag:
image: woodpeckerci/plugin-docker-buildx
privileged: true
settings:
registry: git.faercol.me
repo: git.faercol.me/polyculeconnect/polyculeconnect
auto_tag: true
platforms:
- linux/amd64
# - linux/arm64
username:
from_secret: git_username
password:
from_secret: git_password
when:
- event: tag
depends_on:
- test
when:
event: [push, tag]

View file

@ -1,13 +0,0 @@
steps:
go-test:
image: golang
commands:
- make -C polyculeconnect test
go-build:
image: golang
commands:
- make -C polyculeconnect build
when:
event: [push, tag]