feat(tailscale): add accept-routes config option #228
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Docker Image | |
on: | |
- push | |
jobs: | |
e2e: | |
uses: ./.github/workflows/e2e.yml | |
build: | |
name: Matrix Build Docker Image Digests | |
needs: | |
- e2e | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- linux/amd64 | |
- linux/arm64 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: Generate Docker Metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ghcr.io/${{ github.repository }}/ot-sim | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Docker Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push by Digest | |
id: build | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
target: prod | |
platforms: ${{ matrix.platform }} | |
labels: ${{ steps.meta.output.labels }} | |
outputs: type=image,name=ghcr.io/${{ github.repository }}/ot-sim,push-by-digest=true,name-canonical=true,push=true | |
- name: Export Digest | |
run: | | |
mkdir -p /tmp/digests | |
digest="${{ steps.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 | |
merge: | |
name: Push Docker image to GitHub Packages | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Download Digests | |
uses: actions/download-artifact@v3 | |
with: | |
name: digests | |
path: /tmp/digests | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Generate Docker metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ghcr.io/${{ github.repository }}/ot-sim | |
- name: Login to GitHub Docker Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- 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 'ghcr.io/${{ github.repository }}/ot-sim@sha256:%s ' *) | |
- name: Inspect Image | |
run: | | |
docker buildx imagetools inspect ghcr.io/${{ github.repository }}/ot-sim:${{ steps.meta.outputs.version }} |