Compare commits

..

No commits in common. "main" and "v1.1.0" have entirely different histories.
main ... v1.1.0

8 changed files with 39 additions and 176 deletions

View File

@ -14,7 +14,7 @@ jobs:
- name: Extract version
id: version
run: echo "VERSION=$(echo ${{ gitea.ref_name }} | sed 's/-amd64//')" >> $GITHUB_OUTPUT
run: echo "VERSION=$(echo ${{ gitea.tag_name }} | sed 's/-amd64//')" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

View File

@ -14,7 +14,7 @@ jobs:
- name: Extract version
id: version
run: echo "VERSION=$(echo ${{ gitea.ref_name }} | sed 's/-arm64//')" >> $GITHUB_OUTPUT
run: echo "VERSION=$(echo ${{ gitea.tag_name }} | sed 's/-arm64//')" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

View File

@ -1,40 +0,0 @@
name: Multi-Arch Build
on:
release:
types: [published]
jobs:
docker:
runs-on: ubuntu-latest
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 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,linux/arm64
push: true
build-args: |
NODE_ENV=production
tags: |
dcr.behzadan.com/reza/wireguard-3proxy:latest
dcr.behzadan.com/reza/wireguard-3proxy:${{ gitea.ref_name }}

View File

@ -1,46 +0,0 @@
name: Build and Push to Gitea Artifact Registry
on:
workflow_dispatch:
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 }}

View File

@ -3,7 +3,10 @@ name: Generic Build
on:
push:
tags:
- 'v*-native'
- 'v*'
tags-ignore:
- 'v*-arm64'
- 'v*-amd64'
jobs:
docker:
@ -12,10 +15,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract version
id: version
run: echo "VERSION=$(echo ${{ gitea.ref_name }} | sed 's/-native//')" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -33,4 +32,4 @@ jobs:
push: true
tags: |
dcr.behzadan.com/reza/wireguard-3proxy:latest
dcr.behzadan.com/reza/wireguard-3proxy:${{ steps.version.outputs.VERSION }}
dcr.behzadan.com/reza/wireguard-3proxy:${{ gitea.tag_name }}

32
.github/workflows/build-and-push.yaml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Build and Publish Docker Image
on:
release:
types: [published]
env:
IMAGE_NAME: rbehzadan/wireguard-3proxy
IMAGE_TAG: ${{ github.event.release.tag_name }}
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} .
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Push Docker image to Docker Hub
run: |
docker push ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
docker tag ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} ${{ env.IMAGE_NAME }}:latest
docker push ${{ env.IMAGE_NAME }}:latest

View File

@ -1,38 +0,0 @@
name: Build and Publish Docker Image (Multi-Arch)
on:
workflow_dispatch:
env:
IMAGE_NAME: rbehzadan/wireguard-3proxy
IMAGE_TAG: ${{ github.event.release.tag_name }}
jobs:
build-and-publish:
runs-on: ubuntu-latest
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
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}

View File

@ -1,44 +0,0 @@
name: Build and Publish Docker Image (Multi-Arch)
on:
release:
types: [published]
env:
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/wireguard-3proxy
IMAGE_TAG: ${{ github.event.release.tag_name }}
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
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
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}