Merge pull request #44 from WisdomSky:version/2024.10.1 #17
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: Build | |
on: | |
push: | |
branches: | |
- "main" | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Extract version from Dockerfile | |
run: | | |
CLOUDFLARED_VERSION=$(grep -oP '(?<=ARG CLOUDFLARED_VERSION=).*' Dockerfile) | |
echo "version is $CLOUDFLARED_VERSION" | |
echo "DOCKER_TAG=$CLOUDFLARED_VERSION" >> $GITHUB_ENV | |
- | |
name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64,linux/armhf, linux/arm | |
provenance: false | |
push: true | |
tags: | | |
wisdomsky/cloudflared-web:${{ env.DOCKER_TAG }}, | |
wisdomsky/cloudflared-web:latest, | |
ghcr.io/wisdomsky/cloudflared-web:${{ env.DOCKER_TAG }}, | |
ghcr.io/wisdomsky/cloudflared-web:latest |