|
|
@@ -0,0 +1,59 @@
|
|
|
+name: docker-vpnclient
|
|
|
+
|
|
|
+on:
|
|
|
+ push:
|
|
|
+ branches:
|
|
|
+ - 'master'
|
|
|
+ tags:
|
|
|
+ - '*'
|
|
|
+ pull_request:
|
|
|
+ workflow_dispatch:
|
|
|
+
|
|
|
+jobs:
|
|
|
+ docker-vpnclient:
|
|
|
+ strategy:
|
|
|
+ matrix:
|
|
|
+ variant: [
|
|
|
+ { name: amd64, platform: "linux/amd64", repo: "softethervpn/vpnclient" },
|
|
|
+ { name: arm64, platform: "linux/arm64", repo: "softethervpn/vpnclient-arm64" }
|
|
|
+ ]
|
|
|
+ name: vpnclient/${{ matrix.variant.name }}
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ if: ${{ github.repository_owner == 'SoftEtherVPN' }}
|
|
|
+ steps:
|
|
|
+ -
|
|
|
+ name: Docker meta
|
|
|
+ id: meta
|
|
|
+ uses: docker/metadata-action@v5
|
|
|
+ with:
|
|
|
+ images: ${{ matrix.variant.repo }}
|
|
|
+ tags: |
|
|
|
+ type=raw,value=latest,enable={{is_default_branch}}
|
|
|
+ type=ref,event=pr
|
|
|
+ type=semver,pattern={{version}}
|
|
|
+ type=semver,pattern={{major}}.{{minor}}
|
|
|
+ -
|
|
|
+ name: Set up QEMU
|
|
|
+ uses: docker/setup-qemu-action@v3
|
|
|
+ with:
|
|
|
+ image: tonistiigi/binfmt:qemu-v9.2.0
|
|
|
+ -
|
|
|
+ name: Set up Docker Buildx
|
|
|
+ uses: docker/setup-buildx-action@v3
|
|
|
+ -
|
|
|
+ name: Login to DockerHub
|
|
|
+ if: ${{ github.event_name != 'pull_request' }}
|
|
|
+ uses: docker/login-action@v3
|
|
|
+ with:
|
|
|
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
+ -
|
|
|
+ name: Build and push
|
|
|
+ uses: docker/build-push-action@v6
|
|
|
+ with:
|
|
|
+ file: ./Dockerfile
|
|
|
+ target: vpnclient
|
|
|
+ platforms: ${{ matrix.variant.platform }}
|
|
|
+ push: ${{ github.event_name != 'pull_request' }}
|
|
|
+ tags: ${{ steps.meta.outputs.tags }}
|
|
|
+ labels: ${{ steps.meta.outputs.labels }}
|