soulsync/.github/workflows/docker-publish.yml
GitHub Actions 74bdb1c84b Fix Unknown Artist fallback during Spotify rate-limiting and update CI to use GHCR
- Add fallback chain in spotify_artist_context construction to use track.artists
  when explicit_artist_context has placeholder names like 'Unknown Artist'
- Add fallback in _extract_spotify_metadata to use original_search['artists']
  when album_artist resolution fails due to Spotify rate-limiting
- This fixes downloads being saved to 'Unknown Artist' folders when Spotify API
  is rate-limited but actual artist data is available from download sources
- Update GitHub Actions workflow to push Docker images only to GitHub Container
  Registry (ghcr.io) instead of Docker Hub
2026-04-09 04:41:40 +00:00

48 lines
1.2 KiB
YAML

name: Build and Push Docker Image
on:
workflow_dispatch:
inputs:
version_tag:
description: 'Version tag (e.g. 1.6, 1.7)'
required: true
default: '2.2'
push:
branches:
- main
- master
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
no-cache: true
pull: true
build-args: |
COMMIT_SHA=${{ github.sha }}
tags: |
ghcr.io/${{ github.repository_owner }}/soulsync:latest
ghcr.io/${{ github.repository_owner }}/soulsync:${{ inputs.version_tag || 'dev' }}