This repository was archived by the owner on Aug 26, 2026. It is now read-only.
Persist Media playback volume per profile #88
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Fast checks / publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| platforms: | |
| description: Docker platforms to publish | |
| required: true | |
| default: linux/amd64,linux/arm64 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| quick-checks: | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 2 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Fast syntax checks | |
| run: | | |
| python3 -m compileall -q app tests | |
| sh -n docker/entrypoint.sh | |
| build-and-push: | |
| if: github.event_name == 'workflow_dispatch' || github.ref_name == 'main' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Compute version (YEAR.WEEK.N) | |
| id: version | |
| run: | | |
| YEAR=$(date -u +%Y) | |
| WEEK=$(date -u +%V) | |
| # Remove leading zero for clean version number | |
| WEEK_NUM=$((10#$WEEK)) | |
| WEEK_PAD=$(printf "%02d" "$WEEK_NUM") | |
| # Find existing releases for this year.week prefix | |
| PREFIX="${YEAR}.${WEEK_PAD}" | |
| LATEST=$(gh release list --limit 100 --json tagName -q \ | |
| "[.[] | select(.tagName | startswith(\"${PREFIX}.\"))] | length") | |
| N=$(( LATEST + 1 )) | |
| VERSION="${PREFIX}.${N}" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "Computed version: $VERSION" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up QEMU (multi-platform) | |
| 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: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/raccommode/p-streamrec | |
| tags: | | |
| type=raw,value=${{ steps.version.outputs.version }} | |
| type=raw,value=latest,enable=${{ github.ref_name == 'main' }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| platforms: ${{ github.event_name == 'workflow_dispatch' && inputs.platforms || 'linux/amd64,linux/arm64' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| APP_VERSION=${{ steps.version.outputs.version }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Create GitHub Release | |
| if: github.ref_name == 'main' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.version.outputs.version }} | |
| name: v${{ steps.version.outputs.version }} | |
| generate_release_notes: true | |
| - name: Sync Umbrel app version | |
| if: github.ref_name == 'main' | |
| env: | |
| VERSION: ${{ steps.version.outputs.version }} | |
| run: | | |
| APP_YML="p-streamrec-store-p-streamrec/umbrel-app.yml" | |
| # Replace the first `version: "..."` line (top-level manifest field) | |
| sed -i -E "0,/^version: \"[^\"]*\"$/ s//version: \"${VERSION}\"/" "$APP_YML" | |
| echo "--- Updated umbrel-app.yml ---" | |
| grep "^version:" "$APP_YML" | |
| - name: Commit Umbrel version bump | |
| if: github.ref_name == 'main' | |
| env: | |
| VERSION: ${{ steps.version.outputs.version }} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add p-streamrec-store-p-streamrec/umbrel-app.yml | |
| if git diff --staged --quiet; then | |
| echo "No Umbrel version change to commit" | |
| else | |
| git commit -m "chore(umbrel): sync app version to ${VERSION}" | |
| # Pushes with GITHUB_TOKEN don't retrigger workflows, so no loop. | |
| git push origin HEAD:main | |
| fi |