Skip to content

cloudflared Docker images #128

cloudflared Docker images

cloudflared Docker images #128

Workflow file for this run

name: cloudflared Docker images
on:
workflow_dispatch:
push:
branches:
- main
- feature/*
schedule:
# Midnight on Sunday and Wednesday
- cron: "0 0 * * 0,3"
jobs:
# When pushing to the main branch, we (re)generate images, tagged with
# "latest"
ghcr:
runs-on: ubuntu-latest
if: github.ref_name == 'main'
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=moby/buildkit:master
platforms: linux/amd64,linux/arm64,linux/i386
-
name: Build and Push GHCR images
env:
DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/cloudflared
SOURCE_COMMIT: ${{ github.sha }}
PLATFORMS: ${{ steps.buildx.outputs.platforms }}
LABEL_AUTHOR: Emmanuel Frécon <[email protected]>
LABEL_URL: ${{ github.server_url }}/${{ github.repository }}
LABEL_DESCRIPTION: Cloudflare Tunnel client
LABEL_TITLE: cloudflared
run: ./.github/bin/build+push.sh
# When pushing to feature branches, we test stuff on the platform of the
# runner only, using a local registry so as to be able to push and pull to
# Docker from the builder steps.
build:
runs-on: ubuntu-latest
if: github.ref_name != 'main'
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
-
name: Build and Push GHCR images
env:
DOCKER_REPO: localhost:5000/${{ github.repository_owner }}/cloudflared
SOURCE_COMMIT: ${{ github.sha }}
PLATFORMS: ${{ steps.buildx.outputs.platforms }}
LABEL_AUTHOR: Emmanuel Frécon <[email protected]>
LABEL_URL: ${{ github.server_url }}/${{ github.repository }}
LABEL_DESCRIPTION: Cloudflare Tunnel client
LABEL_TITLE: cloudflared
run: ./.github/bin/build+push.sh