From bfc11f7f915824de179122b057a7fedea48a0ac0 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 11 Aug 2024 16:42:21 +0200 Subject: [PATCH] Use forgejo actions (#140) Closes #139 - Replace Woodpecker CI by Forgejo actions Reviewed-on: https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/pulls/140 Co-authored-by: Mylloon Co-committed-by: Mylloon --- .forgejo/workflows/publish.yml | 51 ++++++++++++++++++++++++---------- README.md | 2 +- 2 files changed, 37 insertions(+), 16 deletions(-) diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml index 3e18079..1271df3 100644 --- a/.forgejo/workflows/publish.yml +++ b/.forgejo/workflows/publish.yml @@ -1,15 +1,36 @@ -steps: - publish: - image: woodpeckerci/plugin-docker-buildx:2 - settings: - labels: - platform: linux/amd64 - repo: git.mylloon.fr/${CI_REPO,,} - auto_tag: true - registry: git.mylloon.fr - username: ${CI_REPO_OWNER} - password: - from_secret: cb_token - when: - event: push - branch: main +name: Publish latest version + +on: + push: + branches: [main] + +jobs: + build: + container: + image: ghcr.io/catthehacker/ubuntu:act-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Sanitize metadata + id: meta + uses: docker/metadata-action@v5 + with: + tags: latest + images: git.mylloon.fr/${{ github.repository }} + + - name: Login to Registry + uses: docker/login-action@v3 + with: + registry: ${{ github.server_url }} + username: ${{ github.actor }} + password: ${{ secrets.TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} diff --git a/README.md b/README.md index 5d00dd3..a0bde67 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 🌱 Botanique [![status-badge](https://ci.mylloon.fr/api/badges/ConfrerieDuKassoulait/Botanique/status.svg)](https://ci.mylloon.fr/ConfrerieDuKassoulait/Botanique) +# 🌱 Botanique ![status-badge](https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/badges/workflows/publish.yml/badge.svg) [**Ajoute le bot à ton serveur**](https://discord.com/api/oauth2/authorize?client_id=965598852407230494&permissions=8&scope=bot%20applications.commands)