This repository has been archived by the owner on Feb 21, 2024. It is now read-only.
Bump actions/checkout from 3 to 4 #11
Workflow file for this run
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
on: | |
push: | |
concurrency: build | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
IMAGE_PATH: docker.io/youfu/icmp-tunnel:latest | |
PLATFORM: linux/386,linux/amd64,linux/arm/v5,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/mips,linux/mips64,linux/ppc64,linux/ppc64le,linux/s390x,linux/riscv64,linux/loong64 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare BuildKit node | |
run: docker buildx create --driver docker-container --use | |
- name: Build docker image (non-master) | |
if: github.ref != 'refs/heads/master' | |
run: |- | |
docker buildx build --platform "$PLATFORM" --tag "$IMAGE_PATH" . | |
- name: Build and push docker image (master) | |
if: github.ref == 'refs/heads/master' | |
env: | |
REGISTRY_USERNAME: youfu | |
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} | |
run: |- | |
docker login --username "$REGISTRY_USERNAME" --password "$REGISTRY_PASSWORD" "${IMAGE_PATH%%/*}" | |
docker buildx build --platform "$PLATFORM" --tag "$IMAGE_PATH" --push . |