From 14c580163dabe5f51a45c66afd8b86517d22ab78 Mon Sep 17 00:00:00 2001 From: Melora Hugues Date: Mon, 5 Aug 2024 16:50:08 +0200 Subject: [PATCH] Add forgejo action CI --- .forgejo/workflows/release_master.yml | 21 +++++++++++++++++++++ .forgejo/workflows/release_tag.yml | 21 +++++++++++++++++++++ .forgejo/workflows/test.yml | 16 ++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 .forgejo/workflows/release_master.yml create mode 100644 .forgejo/workflows/release_tag.yml create mode 100644 .forgejo/workflows/test.yml diff --git a/.forgejo/workflows/release_master.yml b/.forgejo/workflows/release_master.yml new file mode 100644 index 0000000..96bf42c --- /dev/null +++ b/.forgejo/workflows/release_master.yml @@ -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/faercol/hugo-relie:latest diff --git a/.forgejo/workflows/release_tag.yml b/.forgejo/workflows/release_tag.yml new file mode 100644 index 0000000..215f5ac --- /dev/null +++ b/.forgejo/workflows/release_tag.yml @@ -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/faercol/hugo-relie:${{ gitea.ref_name }} diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml new file mode 100644 index 0000000..bf731a8 --- /dev/null +++ b/.forgejo/workflows/test.yml @@ -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: faercol/hugo-relie:latest