Skip to content

Update docker-multiarch.yml #22

Update docker-multiarch.yml

Update docker-multiarch.yml #22

name: Build and Push Multi-Platform Docker Image
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux/amd64, linux/arm64]
tag: ['latest', '$(date +%Y%m%d)-${{ matrix.platform }}']

Check failure on line 17 in .github/workflows/docker-multiarch.yml

View workflow run for this annotation

GitHub Actions / Build and Push Multi-Platform Docker Image

Invalid workflow file

The workflow is not valid. .github/workflows/docker-multiarch.yml (Line: 17, Col: 25): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.platform
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
platforms: ${{ matrix.platform }}
tags: |
${{ secrets.DOCKER_USERNAME }}/bilibili-audio-downloader:${{ matrix.tag }}
push: true