From 14c580163dabe5f51a45c66afd8b86517d22ab78 Mon Sep 17 00:00:00 2001 From: Melora Hugues Date: Mon, 5 Aug 2024 16:50:08 +0200 Subject: [PATCH 1/2] 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 -- 2.45.2 From d3d859baa9bda1756dff4a519d4e5474928f8e92 Mon Sep 17 00:00:00 2001 From: Melora Hugues Date: Mon, 5 Aug 2024 20:59:50 +0200 Subject: [PATCH 2/2] Remove woodpecker config --- .woodpecker/release.yml | 20 -------------------- .woodpecker/test.yml | 31 ------------------------------- 2 files changed, 51 deletions(-) delete mode 100644 .woodpecker/release.yml delete mode 100644 .woodpecker/test.yml diff --git a/.woodpecker/release.yml b/.woodpecker/release.yml deleted file mode 100644 index 8e9260b..0000000 --- a/.woodpecker/release.yml +++ /dev/null @@ -1,20 +0,0 @@ -depends_on: - - test - -steps: -- name: docker-push-tag - image: woodpeckerci/plugin-docker-buildx - privileged: true - settings: - registry: git.faercol.me - repo: git.faercol.me/faercol/hugo-relie - auto_tag: true - platforms: - - linux/amd64 - username: - from_secret: GIT_USERNAME - password: - from_secret: GIT_PASSWORD - -when: - event: [tag] diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml deleted file mode 100644 index e887029..0000000 --- a/.woodpecker/test.yml +++ /dev/null @@ -1,31 +0,0 @@ -steps: -- name: docker-build-only - image: woodpeckerci/plugin-docker-buildx - privileged: true - settings: - repo: git.faercol.me/faercol/hugo-relie - tags: latest - dry_run: true - platforms: - - linux/amd64 - when: - branch: - exclude: - - main - -- name: docker-build-push - image: woodpeckerci/plugin-docker-buildx - privileged: true - settings: - repo: git.faercol.me/faercol/hugo-relie - registry: git.faercol.me - tags: latest - username: - from_secret: GIT_USERNAME - password: - from_secret: GIT_PASSWORD - platforms: - - linux/amd64 - when: - branch: - - main -- 2.45.2