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
|
name: Build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch: [linux/amd64, linux/arm64]
|
arch: [amd64, arm64]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -28,11 +28,11 @@ jobs:
|
|||||||
id: set-vars
|
id: set-vars
|
||||||
run: |
|
run: |
|
||||||
VERSION="1.0.1"
|
VERSION="1.0.1"
|
||||||
if [ ${{ matrix.arch }} == linux/amd64 ]; then
|
if [ ${{ matrix.arch }} == amd64 ]; then
|
||||||
BAIDUNETDISK_VERSION=$(jq -r '.[1] | "\(.version)"' info.json);
|
BAIDUNETDISK_VERSION=$(jq -r '.[1] | "\(.version)"' info.json);
|
||||||
BAIDUNETDISK_URL=$(jq -r '.[1] | "\(.url)"' info.json);
|
BAIDUNETDISK_URL=$(jq -r '.[1] | "\(.url)"' info.json);
|
||||||
fi
|
fi
|
||||||
if [ ${{ matrix.arch }} == linux/arm64 ]; then
|
if [ ${{ matrix.arch }} == arm64 ]; then
|
||||||
BAIDUNETDISK_VERSION=$(jq -r '.[2] | "\(.version)"' info.json);
|
BAIDUNETDISK_VERSION=$(jq -r '.[2] | "\(.version)"' info.json);
|
||||||
BAIDUNETDISK_URL=$(jq -r '.[2] | "\(.url)"' info.json);
|
BAIDUNETDISK_URL=$(jq -r '.[2] | "\(.url)"' info.json);
|
||||||
fi
|
fi
|
||||||
@ -47,8 +47,9 @@ jobs:
|
|||||||
echo "BRACH=${BRACH}" >> $GITHUB_OUTPUT
|
echo "BRACH=${BRACH}" >> $GITHUB_OUTPUT
|
||||||
echo "DATE=${DATE}" >> $GITHUB_OUTPUT
|
echo "DATE=${DATE}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Docker Meta
|
- name: Docker Meta (amd64)
|
||||||
id: meta
|
id: meta-amd
|
||||||
|
if: ${{ matrix.arch }} == amd64
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
@ -59,6 +60,19 @@ jobs:
|
|||||||
type=raw,value=${{ steps.set-vars.outputs.BRACH }}
|
type=raw,value=${{ steps.set-vars.outputs.BRACH }}
|
||||||
type=raw,value=latest
|
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
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
@ -78,18 +92,36 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Buildx
|
- name: Buildx (amd64)
|
||||||
|
if: ${{ matrix.arch }} == amd64
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
platforms: |
|
platforms: |
|
||||||
${{ matrix.arch }}
|
linux/amd64
|
||||||
push: true
|
push: true
|
||||||
build-args: |
|
build-args: |
|
||||||
BUILD_DATE=${{ steps.set-vars.outputs.DATE }}
|
BUILD_DATE=${{ steps.set-vars.outputs.DATE }}
|
||||||
VERSION=${{ steps.set-vars.outputs.VERSION }}
|
VERSION=${{ steps.set-vars.outputs.VERSION }}
|
||||||
BAIDUNETDISK_VERSION=${{ steps.set-vars.outputs.BAIDUNETDISK_VERSION }}
|
BAIDUNETDISK_VERSION=${{ steps.set-vars.outputs.BAIDUNETDISK_VERSION }}
|
||||||
BAIDUNETDISK_URL=${{ steps.set-vars.outputs.BAIDUNETDISK_URL }}
|
BAIDUNETDISK_URL=${{ steps.set-vars.outputs.BAIDUNETDISK_URL }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta-amd.outputs.labels }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
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