mirror of
https://github.com/YuCat-OVO/BaiduNetdisk-Docker
synced 2025-05-10 20:10:04 +08:00
arch
This commit is contained in:
parent
0f0272fa2c
commit
0ecbbced96
50
.github/workflows/build.yml
vendored
50
.github/workflows/build.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
name: Build
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [linux/amd64, linux/arm64]
|
||||
arch: [amd64, arm64]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -28,11 +28,11 @@ jobs:
|
||||
id: set-vars
|
||||
run: |
|
||||
VERSION="1.0.1"
|
||||
if [ ${{ matrix.arch }} == linux/amd64 ]; then
|
||||
if [ ${{ matrix.arch }} == amd64 ]; then
|
||||
BAIDUNETDISK_VERSION=$(jq -r '.[1] | "\(.version)"' info.json);
|
||||
BAIDUNETDISK_URL=$(jq -r '.[1] | "\(.url)"' info.json);
|
||||
fi
|
||||
if [ ${{ matrix.arch }} == linux/arm64 ]; then
|
||||
if [ ${{ matrix.arch }} == arm64 ]; then
|
||||
BAIDUNETDISK_VERSION=$(jq -r '.[2] | "\(.version)"' info.json);
|
||||
BAIDUNETDISK_URL=$(jq -r '.[2] | "\(.url)"' info.json);
|
||||
fi
|
||||
@ -47,8 +47,9 @@ jobs:
|
||||
echo "BRACH=${BRACH}" >> $GITHUB_OUTPUT
|
||||
echo "DATE=${DATE}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker Meta
|
||||
id: meta
|
||||
- name: Docker Meta (amd64)
|
||||
id: meta-amd
|
||||
if: ${{ matrix.arch }} == amd64
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
@ -59,6 +60,19 @@ jobs:
|
||||
type=raw,value=${{ steps.set-vars.outputs.BRACH }}
|
||||
type=raw,value=latest
|
||||
|
||||
- name: Docker Meta (arm64)
|
||||
id: meta-arm
|
||||
if: ${{ matrix.arch }} == arm64
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}
|
||||
ghcr.io/${{ github.repository }}
|
||||
tags: |
|
||||
type=raw,value=arm64-${{ steps.set-vars.outputs.VERSION }}
|
||||
type=raw,value=arm64-${{ steps.set-vars.outputs.BRACH }}
|
||||
type=raw,value=arm64-latest
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
@ -78,18 +92,36 @@ jobs:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Buildx
|
||||
- name: Buildx (amd64)
|
||||
if: ${{ matrix.arch }} == amd64
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: |
|
||||
${{ matrix.arch }}
|
||||
linux/amd64
|
||||
push: true
|
||||
build-args: |
|
||||
BUILD_DATE=${{ steps.set-vars.outputs.DATE }}
|
||||
VERSION=${{ steps.set-vars.outputs.VERSION }}
|
||||
BAIDUNETDISK_VERSION=${{ steps.set-vars.outputs.BAIDUNETDISK_VERSION }}
|
||||
BAIDUNETDISK_URL=${{ steps.set-vars.outputs.BAIDUNETDISK_URL }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta-amd.outputs.labels }}
|
||||
tags: ${{ steps.meta-amd.outputs.tags }}
|
||||
|
||||
- name: Buildx (arm64)
|
||||
if: ${{ matrix.arch }} == arm64
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: |
|
||||
linux/arm64
|
||||
push: true
|
||||
build-args: |
|
||||
BUILD_DATE=${{ steps.set-vars.outputs.DATE }}
|
||||
VERSION=${{ steps.set-vars.outputs.VERSION }}
|
||||
BAIDUNETDISK_VERSION=${{ steps.set-vars.outputs.BAIDUNETDISK_VERSION }}
|
||||
BAIDUNETDISK_URL=${{ steps.set-vars.outputs.BAIDUNETDISK_URL }}
|
||||
labels: ${{ steps.meta-arm.outputs.labels }}
|
||||
tags: ${{ steps.meta-arm.outputs.tags }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user