Chore: replace woodpecker with forgejo actions
This commit is contained in:
parent
0fc6a4b093
commit
1e76dca0a9
6 changed files with 74 additions and 70 deletions
21
.forgejo/workflows/docker-build-push-master.yml
Normal file
21
.forgejo/workflows/docker-build-push-master.yml
Normal 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
|
21
.forgejo/workflows/docker-build-push-tag.yml
Normal file
21
.forgejo/workflows/docker-build-push-tag.yml
Normal 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 }}
|
16
.forgejo/workflows/docker-build.yml
Normal file
16
.forgejo/workflows/docker-build.yml
Normal 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
|
16
.forgejo/workflows/go-test.yml
Normal file
16
.forgejo/workflows/go-test.yml
Normal 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
|
|
@ -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]
|
|
|
@ -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]
|
|
Loading…
Reference in a new issue