Skip to content

README + minor changes #13

README + minor changes

README + minor changes #13

Workflow file for this run

name: Build a Mopidy Docker image (arm64)
on:
push:
branches: [master]
paths:
- 'Dockerfile'
- 'docker/**'
- '.github/workflows/**'
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
docker-build:
runs-on: ubuntu-24.04-arm
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
- name: Login to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Mopidy version
id: version
run: |
URL=https://apt.mopidy.com/dists/bookworm/main/binary-arm64/Packages
VERSION=$(curl -s ${URL} | grep -A1 '^Package: mopidy$' | awk '/^Version:/ { sub(/-.*$/, ""); print $2 }' | sort | tail -n 1)
echo "Found version: ${VERSION}"
echo "mopidy_version=${VERSION}" >> $GITHUB_OUTPUT
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=raw,value=latest
type=sha,prefix=sha-
type=sha
type=raw,value=${{ steps.version.outputs.mopidy_version }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: |
type=gha,scope=docker-${{ github.workflow }}
cache-to: |
type=gha,mode=max,scope=docker-${{ github.workflow }}