music-assistant-server

1.6 KBYML
build-base-image.yml
1.6 KB48 lines • yaml
1name: Build base image
2
3on:
4  workflow_dispatch:
5    inputs:
6      version:
7        description: "Version number"
8        required: true
9        type: string
10env:
11  PYTHON_VERSION: "3.12"
12
13jobs:
14  build-base-image:
15    name: Builds and pushes the Music Assistant base container to ghcr.io
16    runs-on: ubuntu-latest
17    permissions:
18      packages: write
19    steps:
20      - uses: actions/checkout@v6
21      - name: Download Widevine CDM client files from private repository
22        shell: bash
23        env:
24          TOKEN: ${{ secrets.PRIVILEGED_GITHUB_TOKEN }}
25        run: |
26          mkdir -p widevine_cdm && cd widevine_cdm
27          curl -OJ -H "Authorization: token ${TOKEN}" https://raw.githubusercontent.com/music-assistant/appvars/main/widevine_cdm_client/private_key.pem
28          curl -OJ -H "Authorization: token ${TOKEN}" https://raw.githubusercontent.com/music-assistant/appvars/main/widevine_cdm_client/client_id.bin
29      - name: Log in to the GitHub container registry
30        uses: docker/[email protected]
31        with:
32          registry: ghcr.io
33          username: ${{ github.repository_owner }}
34          password: ${{ secrets.GITHUB_TOKEN }}
35      - name: Set up Docker Buildx
36        uses: docker/[email protected]
37
38      - name: Build and Push image
39        uses: docker/[email protected]
40        with:
41          context: .
42          platforms: linux/amd64,linux/arm64
43          file: Dockerfile.base
44          tags: |-
45            ghcr.io/${{ github.repository_owner }}/base:${{ inputs.version }},
46            ghcr.io/${{ github.repository_owner }}/base:latest
47          push: true
48