Add Multi-Arch build workflow for gitea
Some checks failed
Multi-Arch Build / docker (release) Failing after 6s
Some checks failed
Multi-Arch Build / docker (release) Failing after 6s
This commit is contained in:
parent
747d976f78
commit
86784bfc18
47
.gitea/workflows/multi-arch.yml
Normal file
47
.gitea/workflows/multi-arch.yml
Normal file
@ -0,0 +1,47 @@
|
||||
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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user