Skip to content

Merge pull request #13 from wanjunlei/master #4

Merge pull request #13 from wanjunlei/master

Merge pull request #13 from wanjunlei/master #4

name: build-multiarch-image
on:
push:
branches:
- 'master'
- 'release-*'
tags:
- 'v*'
paths:
- '.github/workflows/build-multiarch.yaml'
- 'Dockerfile'
- 'injector/**'
- 'go.mod'
- 'go.sum'
- 'main.go'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
name: Build Image
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Image
run: |
tag=$(cat VERSION | tr -d " \t\n\r")
make docker-cross-build -e REPO=${{ vars.DOCKER_REPO }} -e TAG=$tag