diff --git a/.gitea/workflows/amd64.yml b/.gitea/workflows/amd64.yml new file mode 100644 index 0000000..8965db3 --- /dev/null +++ b/.gitea/workflows/amd64.yml @@ -0,0 +1,43 @@ +name: AMD64 Build + +on: + push: + tags: + - 'v*-amd64' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Extract version + id: version + run: echo "VERSION=$(echo ${{ gitea.tag_name }} | sed 's/-amd64//')" >> $GITHUB_OUTPUT + + - 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 Private Registry + uses: docker/login-action@v3 + with: + registry: dcr.behzadan.com + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64 + push: true + tags: | + dcr.behzadan.com/reza/wireguard-3proxy:latest + dcr.behzadan.com/reza/wireguard-3proxy:${{ steps.version.outputs.VERSION }} + diff --git a/.gitea/workflows/arm64.yml b/.gitea/workflows/arm64.yml new file mode 100644 index 0000000..1fb92c5 --- /dev/null +++ b/.gitea/workflows/arm64.yml @@ -0,0 +1,43 @@ +name: ARM64 Build + +on: + push: + tags: + - 'v*-arm64' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Extract version + id: version + run: echo "VERSION=$(echo ${{ gitea.tag_name }} | sed 's/-arm64//')" >> $GITHUB_OUTPUT + + - 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 Private Registry + uses: docker/login-action@v3 + with: + registry: dcr.behzadan.com + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/arm64 + push: true + tags: | + dcr.behzadan.com/reza/wireguard-3proxy:latest + dcr.behzadan.com/reza/wireguard-3proxy:${{ steps.version.outputs.VERSION }} + diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..b5c0749 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,35 @@ +name: Generic Build + +on: + push: + tags: + - 'v*' + tags-ignore: + - 'v*-arm64' + - 'v*-amd64' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Private Registry + uses: docker/login-action@v3 + with: + registry: dcr.behzadan.com + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: | + dcr.behzadan.com/reza/wireguard-3proxy:latest + dcr.behzadan.com/reza/wireguard-3proxy:${{ gitea.tag_name }}