Compare commits
No commits in common. "86784bfc185eb3e5097773cc3f49bf9d24a1c7d9" and "3dce43f0be08622b671e825ed18481aefd3454ba" have entirely different histories.
86784bfc18
...
3dce43f0be
@ -1,47 +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: Read version
|
|
||||||
id: version
|
|
||||||
run: |
|
|
||||||
VERSION=$(node -p "require('./package.json').version")
|
|
||||||
BUILD_VERSION="${VERSION}.${GITHUB_RUN_NUMBER}"
|
|
||||||
echo "build_version=${BUILD_VERSION}" >> $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,linux/arm64
|
|
||||||
push: true
|
|
||||||
build-args: |
|
|
||||||
NODE_ENV=production
|
|
||||||
tags: |
|
|
||||||
dcr.behzadan.com/reza/wireguard-3proxy:latest
|
|
||||||
dcr.behzadan.com/reza/wireguard-3proxy:${{ steps.version.outputs.BUILD_VERSION }}
|
|
||||||
|
|
@ -3,7 +3,10 @@ name: Generic Build
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*-native'
|
- 'v*'
|
||||||
|
tags-ignore:
|
||||||
|
- 'v*-arm64'
|
||||||
|
- 'v*-amd64'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
@ -12,10 +15,6 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
@ -33,4 +32,4 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
dcr.behzadan.com/reza/wireguard-3proxy:latest
|
dcr.behzadan.com/reza/wireguard-3proxy:latest
|
||||||
dcr.behzadan.com/reza/wireguard-3proxy:${{ steps.version.outputs.VERSION }}
|
dcr.behzadan.com/reza/wireguard-3proxy:${{ gitea.ref_name }}
|
||||||
|
27
.github/workflows/build-and-push.yaml
vendored
27
.github/workflows/build-and-push.yaml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Build and Publish Docker Image (Multi-Arch)
|
name: Build and Publish Docker Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
@ -11,15 +11,13 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-publish:
|
build-and-publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout the code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Build Docker image
|
||||||
uses: docker/setup-qemu-action@v3
|
run: docker build -t ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} .
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
@ -27,13 +25,8 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Push Docker image to Docker Hub
|
||||||
uses: docker/build-push-action@v5
|
run: |
|
||||||
with:
|
docker push ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
|
||||||
context: .
|
docker tag ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} ${{ env.IMAGE_NAME }}:latest
|
||||||
platforms: linux/amd64,linux/arm64
|
docker push ${{ env.IMAGE_NAME }}:latest
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
${{ env.IMAGE_NAME }}:latest
|
|
||||||
${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user