mirror of
https://github.com/dangeroustech/ZeroTierBridge.git
synced 2025-12-06 09:06:58 +00:00
fix: correct multiplatform builds
because apparently manifests are too difficult
This commit is contained in:
45
.github/workflows/docker-build.yml
vendored
45
.github/workflows/docker-build.yml
vendored
@@ -6,6 +6,9 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- "main"
|
- "main"
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY_IMAGE: registry.dangerous.tech/dangeroustech/zerotierbridge
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Docker_Release:
|
Docker_Release:
|
||||||
name: "Docker Build And Release"
|
name: "Docker Build And Release"
|
||||||
@@ -33,7 +36,7 @@ jobs:
|
|||||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and Push
|
- name: Build
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
@@ -44,6 +47,46 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
platforms: linux/${{ matrix.arch }}
|
platforms: linux/${{ matrix.arch }}
|
||||||
tags: registry.dangerous.tech/dangeroustech/zerotierbridge:latest
|
tags: registry.dangerous.tech/dangeroustech/zerotierbridge:latest
|
||||||
|
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true
|
||||||
|
|
||||||
|
- name: Export Digests
|
||||||
|
run: |
|
||||||
|
mkdir -p /tmp/digests
|
||||||
|
digest="${{ steps.docker_build.outputs.digest }}"
|
||||||
|
touch "/tmp/digests/${digest#sha256:}"
|
||||||
|
|
||||||
|
- name: Upload digest
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: digests
|
||||||
|
path: /tmp/digests/*
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
MergeRefs:
|
||||||
|
name: "Do The Horrible Merge Thing"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download digests
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: digests
|
||||||
|
path: /tmp/digests
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY_IMAGE }}
|
||||||
|
|
||||||
|
- name: Create manifest list and push
|
||||||
|
working-directory: /tmp/digests
|
||||||
|
run: |
|
||||||
|
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||||
|
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
||||||
|
- name: Inspect image
|
||||||
|
run: |
|
||||||
|
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
|
||||||
|
|
||||||
- name: Generate SBOM
|
- name: Generate SBOM
|
||||||
uses: anchore/sbom-action@v0
|
uses: anchore/sbom-action@v0
|
||||||
|
|||||||
@@ -3,12 +3,7 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
zerotierbridge:
|
zerotierbridge:
|
||||||
container_name: zerotierbridge
|
container_name: zerotierbridge
|
||||||
build:
|
image: registry.dangerous.tech/dangeroustech/zerotierbridge
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
args:
|
|
||||||
ARCH: amd64
|
|
||||||
VERSION: 1.12.2
|
|
||||||
restart: always
|
restart: always
|
||||||
privileged: true
|
privileged: true
|
||||||
volumes:
|
volumes:
|
||||||
@@ -17,4 +12,4 @@ services:
|
|||||||
- ZT_NETWORKS=NETWORK_ID_1 NETWORK_ID_2 NETWORK_ID_3
|
- ZT_NETWORKS=NETWORK_ID_1 NETWORK_ID_2 NETWORK_ID_3
|
||||||
- ZT_BRIDGE=true
|
- ZT_BRIDGE=true
|
||||||
volumes:
|
volumes:
|
||||||
zt_config:
|
zt_config:
|
||||||
Reference in New Issue
Block a user