Merge pull request #94 from shantanoo-desai/develop #9
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 and Publish Komponist TUI Docker Image | |
on: | |
push: | |
branches: | |
- "main" | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }}-tui | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- linux/amd64 | |
- linux/arm64 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout Codebase | |
uses: actions/checkout@v3 | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Setup QEMU for Multi-Arch images | |
uses: docker/setup-qemu-action@v2 | |
- name: setup Docker Buildx for Multi-Arch images | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to the Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push Image | |
uses: docker/build-push-action@v4 | |
with: | |
context: "{{defaultContext}}:tui-configurator" | |
push: true | |
provenance: false # Potential solution based on docker/build-push-action/issues/820 | |
platforms: ${{ matrix.platform }} | |
labels: ${{ steps.meta.outputs.labels }} | |
tags: ${{ steps.meta.outputs.tags }} |