1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-02-23 23:09:56 +03:00

run all build sequentially, should help with caching layers

This commit is contained in:
weidi 2025-02-10 21:40:34 +01:00
parent 39996ab0a2
commit 591cf0e9b9

View File

@ -11,20 +11,37 @@ on:
jobs: jobs:
docker: docker:
strategy: name: docker-aio
matrix:
distribution : [vpnclient, vpnserver, vpnbridge]
name: docker-${{ matrix.distribution }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'SoftEtherVPN' }}
steps: steps:
- -
name: Docker meta name: Docker meta vpnserver
id: meta id: metavpnserver
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: softethervpn/${{ matrix.distribution }} images: softethervpn/vpnserver
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Docker meta vpnclient
id: metavpnclient
uses: docker/metadata-action@v5
with:
images: softethervpn/vpnclient
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Docker meta vpnbridge
id: metavpnbridge
uses: docker/metadata-action@v5
with:
images: softethervpn/vpnbridge
tags: | tags: |
type=raw,value=latest,enable={{is_default_branch}} type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=pr type=ref,event=pr
@ -46,11 +63,31 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push vpnserver
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
file: ./Dockerfile file: ./Dockerfile
target: ${{ matrix.distribution }} target: vpnserver
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-
name: Build and push vpnclient
uses: docker/build-push-action@v6
with:
file: ./Dockerfile
target: vpnclient
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-
name: Build and push vpnbridge
uses: docker/build-push-action@v6
with:
file: ./Dockerfile
target: vpnbridge
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}