From fb5080e1c85656214036ee9e37f1254d0b429b3a Mon Sep 17 00:00:00 2001 From: Reza Behzadan Date: Sat, 4 Jan 2025 17:57:29 -0500 Subject: [PATCH] Update gitea workflow to push images to gitea artifact registry --- ...lti-arch.yml => multi-arch-docker-hub.yml} | 3 +- .gitea/workflows/multi-arch-gitea.yml | 47 +++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) rename .gitea/workflows/{multi-arch.yml => multi-arch-docker-hub.yml} (96%) create mode 100644 .gitea/workflows/multi-arch-gitea.yml diff --git a/.gitea/workflows/multi-arch.yml b/.gitea/workflows/multi-arch-docker-hub.yml similarity index 96% rename from .gitea/workflows/multi-arch.yml rename to .gitea/workflows/multi-arch-docker-hub.yml index 7436c2d..959c1f1 100644 --- a/.gitea/workflows/multi-arch.yml +++ b/.gitea/workflows/multi-arch-docker-hub.yml @@ -1,8 +1,7 @@ name: Multi-Arch Build on: - release: - types: [published] + workflow_dispatch: jobs: docker: diff --git a/.gitea/workflows/multi-arch-gitea.yml b/.gitea/workflows/multi-arch-gitea.yml new file mode 100644 index 0000000..1a53e08 --- /dev/null +++ b/.gitea/workflows/multi-arch-gitea.yml @@ -0,0 +1,47 @@ +name: Build and Push to Gitea Artifact Registry + +on: + release: + types: [published] + +env: + IMAGE_NAME: git.behzadan.com/reza/wireguard-3proxy + +jobs: + docker: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --allow-insecure-entitlement network.host + + - name: Login to Gitea Artifact Registry + uses: docker/login-action@v3 + with: + registry: git.behzadan.com + username: ${{ github.actor }} + password: ${{ secrets.GITEA_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + build-args: | + NODE_ENV=production + tags: | + git.behzadan.com/reza/wireguard-3proxy:latest + git.behzadan.com/reza/wireguard-3proxy:${{ github.event.release.tag_name }} +