Fix mensa formatting #387
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: Docker | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
# TODO: Add multi-runner build for x86_64/arm64 multiarch images once GitHub | |
# provides official arm64 Linux runners for open-source. | |
# See https://github.com/fwcd/d2/issues/154 | |
jobs: | |
build-image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to GHCR | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ghcr.io/fwcd/d2 | |
tags: | | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=sha,format=long | |
- name: Build and Push image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64 | |
network: host | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |