Compare commits

..

1 Commits

5 changed files with 64 additions and 60 deletions

View File

@@ -1,11 +0,0 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- dependencies
- github-actions

View File

@@ -13,10 +13,6 @@ permissions:
security-events: write security-events: write
statuses: read statuses: read
concurrency:
group: docker-release-${{ github.ref }}
cancel-in-progress: true
on: on:
pull_request: pull_request:
branches: branches:
@@ -32,9 +28,14 @@ jobs:
Docker_Build: Docker_Build:
name: Docker Build And Release 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@v5 uses: actions/checkout@v4
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
@@ -52,25 +53,46 @@ jobs:
- name: Build - name: Build
id: docker_build id: docker_build
uses: docker/build-push-action@v6 uses: docker/build-push-action@v5
with: with:
context: . context: .
build-args: | build-args: |
VERSION=1.12.2 ARCH=${{ matrix.arch }}
VERSION=${{ matrix.version }}
push: true push: true
platforms: linux/amd64,linux/arm64 platforms: linux/${{ matrix.arch }}
tags: ${{ env.REGISTRY_IMAGE }}:latest outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true
cache-from: type=gha
cache-to: type=gha,mode=max
- 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: MergeRefs:
name: Publish Multi-Arch Image And Release name: Do The Horrible Merge Thing
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:
- Docker_Build - Docker_Build
steps: 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 - name: Login to Registry
id: login id: login
uses: docker/login-action@v3 uses: docker/login-action@v3
@@ -79,6 +101,25 @@ jobs:
username: ${{ secrets.REGISTRY_USERNAME }} username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }} 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
id: sbom id: sbom
@@ -90,7 +131,7 @@ jobs:
output-file: ./sbom.spdx.json output-file: ./sbom.spdx.json
- name: Scan SBOM - name: Scan SBOM
uses: anchore/scan-action@v7 uses: anchore/scan-action@v3
id: scan id: scan
with: with:
sbom: sbom.spdx.json sbom: sbom.spdx.json
@@ -99,15 +140,15 @@ jobs:
only-fixed: true only-fixed: true
- name: upload Anchore scan SARIF report - name: upload Anchore scan SARIF report
uses: github/codeql-action/upload-sarif@v4 uses: github/codeql-action/upload-sarif@v2
with: with:
sarif_file: ${{ steps.scan.outputs.sarif }} sarif_file: ${{ steps.scan.outputs.sarif }}
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v5 uses: actions/checkout@v4
- name: Changelog - name: Changelog
uses: TriPSs/conventional-changelog-action@v6 uses: TriPSs/conventional-changelog-action@v3
id: changelog id: changelog
if: ${{ github.event_name != 'pull_request' }} if: ${{ github.event_name != 'pull_request' }}
with: with:
@@ -120,11 +161,11 @@ jobs:
skip-on-empty: false # otherwise we don't publish fixes skip-on-empty: false # otherwise we don't publish fixes
- name: Create Release - name: Create Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v1
id: release id: release
if: ${{ steps.changelog.outputs.skipped == 'false' }} if: ${{ steps.changelog.outputs.skipped == 'false' }}
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.github_token }}
with: with:
tag_name: ${{ steps.changelog.outputs.tag }} tag_name: ${{ steps.changelog.outputs.tag }}
name: ${{ steps.changelog.outputs.tag }} name: ${{ steps.changelog.outputs.tag }}

View File

@@ -1,21 +1,3 @@
## [1.2.1](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.2.0...v1.2.1) (2025-10-26)
# [1.2.0](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.1.2...v1.2.0) (2025-10-26)
### Bug Fixes
* **workflow:** update artifact naming and handling in docker-build.yml ([96ebbf8](https://github.com/dangeroustech/ZeroTierBridge/commit/96ebbf805d2cb3bb4089a5a0dc70114e3c16cc1b))
### Features
* **docker:** add health check to Dockerfile for zerotier-cli ([7d643e3](https://github.com/dangeroustech/ZeroTierBridge/commit/7d643e3ff6c0683d335baae5138ceef475cd37c3))
## [1.1.2](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.1.1...v1.1.2) (2023-10-18) ## [1.1.2](https://github.com/dangeroustech/ZeroTierBridge/compare/v1.1.1...v1.1.2) (2023-10-18)

View File

@@ -1,27 +1,19 @@
FROM debian:12.6 as stage FROM debian:12.6 as stage
ARG PACKAGE_BASEURL=https://download.zerotier.com/debian/bookworm/pool/main/z/zerotier-one ARG PACKAGE_BASEURL=https://download.zerotier.com/debian/bookworm/pool/main/z/zerotier-one
ARG TARGETARCH ARG ARCH=amd64
ARG VERSION=1.12.2 ARG VERSION=1.12.2
RUN apt-get update -qq && apt-get install -qq --no-install-recommends -y \ RUN apt-get update -qq && apt-get install -qq --no-install-recommends -y ca-certificates curl
ca-certificates=20230311+deb12u1 \ RUN curl -sSL -o zerotier-one.deb "${PACKAGE_BASEURL}/zerotier-one_${VERSION}_${ARCH}.deb"
curl=7.88.1-10+deb12u14
RUN ARCH_MAPPING=$([ "$TARGETARCH" = "amd64" ] && echo amd64 || ([ "$TARGETARCH" = "arm64" ] && echo arm64 || echo "$TARGETARCH")) \
&& curl -sSL -o zerotier-one.deb "${PACKAGE_BASEURL}/zerotier-one_${VERSION}_${ARCH_MAPPING}.deb"
FROM debian:12.6 FROM debian:12.6
ARG VERSION
RUN mkdir /app RUN mkdir /app
WORKDIR /app WORKDIR /app
COPY --from=stage zerotier-one.deb . COPY --from=stage zerotier-one.deb .
RUN apt-get update -qq && apt-get install -qq --no-install-recommends -y \ RUN apt-get update -qq && apt-get install -qq --no-install-recommends -y procps iptables openssl \
procps=2:4.0.2-3 \
iptables=1.8.9-2 \
openssl=3.0.17-1~deb12u3 \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN dpkg -i zerotier-one.deb && rm -f zerotier-one.deb RUN dpkg -i zerotier-one.deb && rm -f zerotier-one.deb
RUN echo "${VERSION}" >/etc/zerotier-version RUN echo "${VERSION}" >/etc/zerotier-version
COPY entrypoint.sh entrypoint.sh COPY entrypoint.sh entrypoint.sh
RUN chmod 755 entrypoint.sh RUN chmod 755 entrypoint.sh
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 CMD sh -c 'zerotier-cli info 2>/dev/null | grep -q ONLINE'
ENTRYPOINT ["/app/entrypoint.sh"] ENTRYPOINT ["/app/entrypoint.sh"]

View File

@@ -1,3 +1,3 @@
{ {
"version": "1.2.1" "version": "1.1.2"
} }