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 }} +