Skip to content

Commit

Permalink
Update docker-multiarch.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss2u authored Nov 5, 2024
1 parent 5d8d831 commit c4d21a7
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/docker-multiarch.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
name: Build and Push Multi-Arch Docker Image
name: Build and Push Docker Image

on:
push:
branches:
- main # 或者你使用的其他分支
- main
pull_request:
branches:
- main

jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux/amd64, linux/arm64]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
platforms: ${{ matrix.platform }}
tags: ${{ secrets.DOCKER_USERNAME }}/bilibili-audio-downloader:latest
push: true

0 comments on commit c4d21a7

Please sign in to comment.