Skip to content

Commit

Permalink
build(action): modify docker image action file
Browse files Browse the repository at this point in the history
  • Loading branch information
AmbitiousJun committed Oct 6, 2024
1 parent 9a168fa commit 894a96e
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,28 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux/amd64, linux/arm64, linux/arm/v7] # 指定目标架构
steps:
- name: Checkout repository
uses: actions/checkout@v3

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

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

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

- name: Build and push Docker images
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
platforms: ${{ matrix.platform }} # 多架构构建
push: false
tags: |
ambitiousjun/go-emby2alist:${{ github.ref_name }}
ambitiousjun/go-emby2alist:latest
- name: Push Docker manifest (multi-architecture)
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ matrix.platform }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
ambitiousjun/go-emby2alist:${{ github.ref_name }}
ambitiousjun/go-emby2alist:latest
- name: Logout from Docker Hub
run: docker logout

0 comments on commit 894a96e

Please sign in to comment.