chore: added comments and defaults in config #7
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
name: Docker Build and Publish | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to GitHub Packages | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract version from tag | |
id: version | |
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
- name: Build and push Docker image (multi-arch) | |
run: | | |
docker buildx build \ | |
--platform linux/amd64,linux/arm64,linux/arm/v7 \ | |
-t ghcr.io/${{ github.repository_owner }}/mq:${{ steps.version.outputs.TAG_NAME }} \ | |
-t ghcr.io/${{ github.repository_owner }}/mq:latest \ | |
--push . |