Skip to content

Merge pull request #456 from flatcar/azure-identity-support #528

Merge pull request #456 from flatcar/azure-identity-support

Merge pull request #456 from flatcar/azure-identity-support #528

Workflow file for this run

name: Build docker image
on:
push:
branches:
- 'flatcar-master'
pull_request:
branches:
- 'flatcar-master'
env:
REGISTRY: ghcr.io
IMAGE_NAME: flatcar/mantle
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Get tag name
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,event=branch,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }},prefix=git-,suffix=,format=long
type=ref,event=pr
type=ref,event=tag
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: true
platforms: linux/amd64,linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}