Skip to content

Add badges

Add badges #2

Workflow file for this run

name: Docker Image CI
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
build:
strategy:
matrix:
# platform: [ linux/amd64, linux/arm64 ]
platform: [ linux/amd64, linux/arm64, linux/arm/v5, linux/arm/v6, linux/arm/v7, linux/386, darwin/amd64, darwin/arm64, windows/amd64, windows/386 ]
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- uses: actions/checkout@v4
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Extract metadata for Docker
# id: meta
# uses: docker/metadata-action@v5
# with:
# labels: |
# maintainer=deluan
# images: |
# name=ghcr.io/${{ github.repository }}
# tags: |
# type=semver,pattern={{version}}
- name: Build
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
platforms: ${{ matrix.platform }}
# push: true
outputs: |
type=local,dest=./output
target: artifact
# tags: ${{ steps.meta.outputs.tags }}
build-args: |
TAGLIB_VERSION=2.0.2
TAGLIB_SHA=e3de03501ff66221d1f1f971022b248d5b38ba06
RELEASE_VERSION=0
- name: Sanitize platform name
id: set-platform
run: |
PLATFORM=$(echo ${{ matrix.platform }} | tr '/' '-')
echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV
- name: Create artifact
id: create-artifact
run: |
mkdir -p ./dist
tar -czf ./dist/taglib-${{ env.PLATFORM }}.tar.gz -C ./output .
- uses: actions/upload-artifact@v4
with:
name: ${{ env.PLATFORM }}
path: ./dist
retention-days: 7
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
path: ./dist
merge-multiple: true
- run: ls -lR ./dist
- name: Generate checksums
run: |
cd ./dist
sha256sum * > checksums.txt
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: ./dist/*
generate_release_notes: true
make_latest: true