From f3031b3ebea5820f5ec6a3488e7e85fdc3f3ef91 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 11 Aug 2024 16:30:48 +0200 Subject: [PATCH] use forgejo actions --- .forgejo/publish.yml | 15 -------------- .forgejo/workflows/publish.yml | 36 ++++++++++++++++++++++++++++++++++ README.md | 2 +- 3 files changed, 37 insertions(+), 16 deletions(-) delete mode 100644 .forgejo/publish.yml create mode 100644 .forgejo/workflows/publish.yml diff --git a/.forgejo/publish.yml b/.forgejo/publish.yml deleted file mode 100644 index 3e18079..0000000 --- a/.forgejo/publish.yml +++ /dev/null @@ -1,15 +0,0 @@ -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 diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml new file mode 100644 index 0000000..1271df3 --- /dev/null +++ b/.forgejo/workflows/publish.yml @@ -0,0 +1,36 @@ +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 47870c3..7d80bfb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # txtdiary -[![status-badge](https://ci.mylloon.fr/api/badges/71/status.svg)](https://ci.mylloon.fr/repos/71) +![status-badge](https://git.mylloon.fr/Anri/txtdiary/badges/workflows/publish.yml/badge.svg) personal diary with txt style, can be private!