Compare commits

..

14 Commits

Author SHA1 Message Date
46ee60cbc9 fix: set latest tag 2023-09-23 22:31:27 +00:00
bca9ec3df7 fix: 401 2023-09-23 21:49:35 +00:00
5cd683cb7a fix: remove tag to hopefully fix digest pushing 2023-09-23 21:44:42 +00:00
8d550748cd fix: push by digest again 2023-09-23 21:39:53 +00:00
f8d73263fd fix: re-setup buildx 2023-09-23 21:33:13 +00:00
2c987a3bbe fix: push by digest is breaking things 2023-09-23 21:30:17 +00:00
be55349cef fix: correct deps 2023-09-23 21:28:42 +00:00
593036c8ad fix: correct multiplatform builds
because apparently manifests are too difficult
2023-09-23 21:27:47 +00:00
Conventional Changelog Action
74c33dff3e chore 🤖: Release v1.1.0 [skip ci] 2023-09-23 21:07:49 +00:00
aab5c079dc feat: multi-platform builds 2023-09-23 21:06:25 +00:00
Conventional Changelog Action
344e30a1f0 chore 🤖: Release v1.0.13 [skip ci] 2023-09-22 21:10:45 +00:00
d3f10891c8 sec: lower vuln threshold 2023-09-22 21:09:20 +00:00
Conventional Changelog Action
7eb72f78f3 chore 🤖: Release v1.0.12 [skip ci] 2023-09-22 21:04:55 +00:00
6e3c2690fc fix: correct double message 2023-09-22 21:03:32 +00:00
6 changed files with 2652 additions and 2569 deletions

View File

@@ -6,9 +6,18 @@ on:
branches: branches:
- "main" - "main"
env:
REGISTRY_IMAGE: registry.dangerous.tech/dangeroustech/zerotierbridge
jobs: jobs:
DockerBuildAndRelease: Docker_Build:
name: "Docker Build And Release"
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
arch: ["amd64", "arm64"]
version: ["1.12.2"]
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -20,20 +29,81 @@ jobs:
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to Registry - name: Login to Registry
id: registry_push id: login
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: registry.dangerous.tech registry: registry.dangerous.tech
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:
context: . context: .
build-args: |
ARCH=${{ matrix.arch }}
VERSION=${{ matrix.version }}
push: true push: true
tags: registry.dangerous.tech/dangeroustech/zerotierbridge:latest platforms: linux/${{ matrix.arch }}
# 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
needs:
- Docker_Build
steps:
- name: Download digests
uses: actions/download-artifact@v3
with:
name: digests
path: /tmp/digests
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Registry
id: login
uses: docker/login-action@v3
with:
registry: registry.dangerous.tech
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
# set latest tag for default branch
# https://github.com/docker/metadata-action#latest-tag
type=raw,value=latest,enable={{is_default_branch}}
- 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
@@ -50,7 +120,7 @@ jobs:
id: scan id: scan
with: with:
sbom: sbom.spdx.json sbom: sbom.spdx.json
severity-cutoff: high severity-cutoff: medium
fail-build: false fail-build: false
only-fixed: true only-fixed: true
by-cve: true by-cve: true
@@ -66,7 +136,7 @@ jobs:
if: ${{ github.event_name != 'pull_request' }} if: ${{ github.event_name != 'pull_request' }}
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
git-message: "chore 🤖: Release {version} [skip ci]" git-message: "chore 🤖: Release {version}"
output-file: "CHANGELOG.md" output-file: "CHANGELOG.md"
tag-prefix: "v" tag-prefix: "v"
fallback-version: "1.0.0" fallback-version: "1.0.0"

View File

@@ -1,3 +1,25 @@
# [1.1.0](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.13...v1.1.0) (2023-09-23)
### Features
* multi-platform builds ([aab5c07](https://github.com/dangeroustech/ZeroTierBridge/commit/aab5c079dcd559b7c3123aa72d02f7691827083e))
## [1.0.13](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.12...v1.0.13) (2023-09-22)
## [1.0.12](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.11...v1.0.12) (2023-09-22)
### Bug Fixes
* correct double message ([6e3c269](https://github.com/dangeroustech/ZeroTierBridge/commit/6e3c2690fc612e42c1d2818cc8d4bdfb9d5e39ba))
## [1.0.11](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.10...v1.0.11) (2023-09-22) ## [1.0.11](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.0.10...v1.0.11) (2023-09-22)

View File

@@ -42,14 +42,10 @@ Disable bridging by passing `ZT_BRIDGE=false`. This can be done after the initia
If you would like the container to retain the same ZeroTier client ID on reboot, attach a volume as per the below. If you would like the container to retain the same ZeroTier client ID on reboot, attach a volume as per the below.
`docker run --privileged -e ZT_NETWORKS=NETWORK_ID_HERE ZT_BRIDGE=true --volume zt1:/var/lib/zerotier-one/ zerotierbridge:latest` `docker run --privileged -e ZT_NETWORKS=NETWORK_ID_HERE ZT_BRIDGE=true --volume zt_config:/var/lib/zerotier-one/ zerotierbridge:latest`
#### Caveat: Architecture #### Caveat: Architecture
If you need to run this on a device with different architecture (a raspberry pi, for instance), then just edit line 3 of the Dockerfile. If you need to run this on a device with different architecture (a raspberry pi, for instance), then just edit line 3 of the Dockerfile.
If you were using a Raspberry Pi 4, you would change this to `ARCH=arm64` and the container will pull the correct ZeroTier installer. If you were using a Raspberry Pi 4, you would change this to `ARCH=arm64` and the container will pull the correct ZeroTier installer.
## TODO
- Add kubernetes deployment YAML

View File

@@ -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:

View File

@@ -1,3 +1,3 @@
{ {
"version": "1.0.11" "version": "1.1.0"
} }

File diff suppressed because it is too large Load Diff