Skip to content

librespot: Upgrade to upstream v0.8.0 #39

librespot: Upgrade to upstream v0.8.0

librespot: Upgrade to upstream v0.8.0 #39

name: Build and publish a Docker image to ghcr.io
on:
release:
types: [ published ]
push:
branches:
- master
pull_request:
branches:
- master
env:
REGISTRY: ghcr.io
jobs:
docker_publish:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Ensure lowercase name
run: echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_REPOSITORY }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max