Chore: replace woodpecker with forgejo actions
This commit is contained in:
parent
0fc6a4b093
commit
f53b67fa81
7 changed files with 76 additions and 72 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
|
17
.forgejo/workflows/go-test.yml
Normal file
17
.forgejo/workflows/go-test.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
jobs:
|
||||
go-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- 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]
|
|
@ -1,7 +1,6 @@
|
|||
# PolyculeConnect
|
||||
|
||||
[![status-badge](https://ci-polycule-connect.chapoline.me/api/badges/1/status.svg)](https://ci-polycule-connect.chapoline.me/repos/1)
|
||||
[![status-badge](https://ci-server.internal.faercol.me/api/badges/2/status.svg)](https://ci-server.internal.faercol.me/repos/2)
|
||||
[![status-badge](https://git.faercol.me/PolyculeConnect/polycule-connect/badges/workflows/go-test.yml/badge.svg?branch=main)](https://ci-polycule-connect.chapoline.me/repos/1)
|
||||
|
||||
![Project logo](./polyculeconnect/static/img/logo-text.png)
|
||||
|
||||
|
|
Loading…
Reference in a new issue