Build base image #12
Workflow file for this run
This file contains 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: Build base image | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version number" | |
required: true | |
type: string | |
env: | |
PYTHON_VERSION: "3.11" | |
jobs: | |
build-base-image: | |
name: Builds and pushes the Music Assistant base container to ghcr.io | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/[email protected] | |
- name: Download Widevine CDM client files from private repository | |
shell: bash | |
env: | |
TOKEN: ${{ secrets.PRIVILEGED_GITHUB_TOKEN }} | |
run: | | |
mkdir -p widevine_cdm && cd widevine_cdm | |
curl -OJ -H "Authorization: token ${TOKEN}" https://raw.githubusercontent.com/music-assistant/appvars/main/widevine_cdm_client/private_key.pem | |
curl -OJ -H "Authorization: token ${TOKEN}" https://raw.githubusercontent.com/music-assistant/appvars/main/widevine_cdm_client/client_id.bin | |
- name: Log in to the GitHub container registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Build and Push image | |
uses: docker/[email protected] | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
file: Dockerfile.base | |
tags: |- | |
ghcr.io/${{ github.repository_owner }}/base:${{ inputs.version }}, | |
ghcr.io/${{ github.repository_owner }}/base:latest | |
push: true |