Skip to content

chore(deps): update dependency tailscale/tailscale to v1.102.2 #295

chore(deps): update dependency tailscale/tailscale to v1.102.2

chore(deps): update dependency tailscale/tailscale to v1.102.2 #295

---
name: Edgenode Image Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- published
concurrency:
group: docker-images-${{ github.head_ref || github.ref }}-${{ github.repository }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
jobs:
build-docker:
runs-on: ${{ matrix.runs-on }}
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- arch: amd64
runs-on: ${{ ((contains(github.event.head_commit.message, '+ci-boost') || contains(github.event.*.labels.*.name, 'ci-boost')) && 'buildjet-16vcpu-ubuntu-2204' || 'ubuntu-latest') }}
- arch: arm64
runs-on: ${{ ((contains(github.event.head_commit.message, '+ci-boost') || contains(github.event.*.labels.*.name, 'ci-boost')) && 'buildjet-16vcpu-ubuntu-2204-arm' || 'ubuntu-latest') }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to the Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: version
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
flavor: |
latest=auto
prefix=
suffix=
tags: |
type=schedule
type=semver,pattern=v{{version}}
type=ref,event=branch
type=ref,event=pr
type=sha
- name: Extract metadata (tags, labels) for Docker
id: arch-tags
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
flavor: |
latest=auto
prefix=
suffix=-${{ matrix.arch }}
tags: |
type=schedule
type=semver,pattern=v{{version}}
type=ref,event=branch
type=ref,event=pr
type=sha
- name: Inform OS Label (release)
if: github.event_name == 'release'
run: |
echo "OS_LABEL=latest" >> $GITHUB_ENV
- name: Inform OS Label (pull request)
if: github.event_name == 'pull_request'
run: |
echo "OS_LABEL=pr-${{ github.event.pull_request.number }}" >> $GITHUB_ENV
- name: Inform OS Label (main)
if: github.event_name != 'pull_request' && github.event_name != 'release' && github.ref == 'refs/heads/main'
run: |
echo "OS_LABEL=main" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
file: Dockerfile.image
target: default
context: ""
# cache into GitHub actions cache, nice
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
platforms: linux/${{ matrix.arch }}
push: true
tags: |
${{ steps.arch-tags.outputs.tags }}
labels: |
${{ steps.arch-tags.outputs.labels }}
build-args: |
OS_LABEL=${{ env.OS_LABEL }}
OS_REPO=${{ env.REGISTRY }}/${{ github.repository }}
GITHUB_REPO=${{ github.repository }}
BUG_REPORT_URL=https://github.com/${{ github.repository }}/issues
HOME_URL=https://github.com/${{ github.repository }}
OS_VERSION=${{ steps.version.outputs.version }}
IMAGE_COMMIT=${{ github.sha }}
- name: Summary
run: |
echo '### Built Image Tags' >> $GITHUB_STEP_SUMMARY
echo '${{ steps.arch-tags.outputs.tags }}' >> $GITHUB_STEP_SUMMARY
echo '### Built Image Labels' >> $GITHUB_STEP_SUMMARY
echo '${{ steps.arch-tags.outputs.labels }}' >> $GITHUB_STEP_SUMMARY
combine-multiarch:
needs:
- build-docker
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Login to the Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
flavor: |
latest=auto
prefix=
suffix=
tags: |
type=schedule
type=semver,pattern=v{{version}}
type=ref,event=branch
type=ref,event=pr
type=sha
- name: Create multi-arch manifests
uses: int128/docker-manifest-create-action@v1
with:
tags: ${{ steps.meta.outputs.tags }}
suffixes: |
-amd64
-arm64
# run: |
# echo '### Multi-Arch Image Tags' >> $GITHUB_STEP_SUMMARY
# echo '${{ steps.meta.outputs.tags }}' > tags.txt
# while read tag; do
# docker pull "${tag}-amd64"
# docker pull "${tag}-arm64"
# docker manifest create "${tag}" --amend "${tag}-amd64" --amend "${tag}-arm64"
# docker manifest annotate --arch amd64 "${tag}" "${tag}-amd64"
# docker manifest annotate --arch arm64 "${tag}" "${tag}-arm64"
# docker manifest inspect "${tag}"
# docker manifest push "${tag}"
# echo "${tag}" >> $GITHUB_STEP_SUMMARY
# done < tags.txt
- name: Summary
run: |
echo '### Built Image Tags' >> $GITHUB_STEP_SUMMARY
echo '${{ steps.meta.outputs.tags }}' >> $GITHUB_STEP_SUMMARY
echo '### Built Image Labels' >> $GITHUB_STEP_SUMMARY
echo '${{ steps.meta.outputs.labels }}' >> $GITHUB_STEP_SUMMARY
build-iso:
needs:
- build-docker
runs-on: ${{ matrix.runs-on }}
if: ${{ (contains(github.event.*.labels.*.name, 'build iso') || contains(github.event.head_commit.message, '+iso') || github.event_name == 'release') }}
strategy:
matrix:
include:
- arch: amd64
runs-on: ${{ ((contains(github.event.head_commit.message, '+ci-boost') || contains(github.event.*.labels.*.name, 'ci-boost')) && 'buildjet-16vcpu-ubuntu-2204' || 'ubuntu-latest') }}
- arch: arm64
runs-on: ${{ ((contains(github.event.head_commit.message, '+ci-boost') || contains(github.event.*.labels.*.name, 'ci-boost')) && 'buildjet-16vcpu-ubuntu-2204-arm' || 'ubuntu-latest') }}
permissions:
contents: read
packages: write
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to the Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
flavor: |
latest=auto
prefix=
suffix=-${{ matrix.arch }}
tags: type=sha
- name: Build ISO-Builder Image
uses: docker/build-push-action@v4
with:
file: Dockerfile.iso-builder
context: ""
# cache into GitHub actions cache, nice
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/${{ matrix.arch }}
push: false
load: true
tags: edgenode/iso:${{ steps.meta.outputs.version }}
labels: |
${{ steps.meta.outputs.labels }}
build-args: |
OS_IMAGE=${{ steps.meta.outputs.tags }}
- name: Build ISO Image
run: |
docker run --platform=linux/${{ matrix.arch }} --rm -v "$PWD":/build edgenode/iso:${{ steps.meta.outputs.version }} --config-dir=. build-iso -o /build -n edgenode-${{ matrix.arch }} --overlay-iso overlay dir:rootfs
- name: Export Artifact
uses: actions/upload-artifact@v3
with:
name: edgenode-${{ matrix.arch }}-iso
path: |
*.iso
*.iso.sha256
edgenode-image-release:
runs-on: ubuntu-latest
needs:
- build-iso
# - build-rpi
if: github.event_name == 'release'
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
id: download
- uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "edgenode-*/*"
overwrite: true
update_latest_release: true
tags: true