Skip to content

Add MIT License to the project #2

Add MIT License to the project

Add MIT License to the project #2

Workflow file for this run

name: build-and-push
on:
push:
branches:
- master
tags:
- 'v*'
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Determine Mutagen version
id: version
run: |
if [[ "${GITHUB_REF_TYPE}" == "tag" && "${GITHUB_REF_NAME}" =~ ^v(.+)$ ]]; then
echo "mutagen_version=${BASH_REMATCH[1]}" >> "$GITHUB_OUTPUT"
else
echo "mutagen_version=0.18.1" >> "$GITHUB_OUTPUT"
fi
- uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/${{ github.repository_owner }}/mutagen
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=${{ steps.version.outputs.mutagen_version }},enable=${{ github.ref_type == 'tag' }}
- uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
build-args: |
MUTAGEN_VERSION=${{ steps.version.outputs.mutagen_version }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}