mirror of
https://github.com/YuCat-OVO/BaiduNetdisk-Docker
synced 2025-05-10 20:10:04 +08:00
matrix
This commit is contained in:
parent
993a235182
commit
ba29b9435b
28
.github/workflows/build.yml
vendored
28
.github/workflows/build.yml
vendored
@ -11,23 +11,37 @@ on:
|
|||||||
- "README.md"
|
- "README.md"
|
||||||
- "get_version.py"
|
- "get_version.py"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE_NAME: BaiduNetdisk-Docker
|
IMAGE_NAME: BaiduNetdisk-Docker
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build:
|
Setup:
|
||||||
name: Build
|
name: Setup
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
Build:
|
||||||
|
name: Build
|
||||||
|
needs: Setup
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: [linux/amd64, linux/arm64]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
- name: Set variables
|
- name: Set variables
|
||||||
id: set-vars
|
id: set-vars
|
||||||
run: |
|
run: |
|
||||||
VERSION="1.0.1"
|
VERSION="1.0.1"
|
||||||
BAIDUNETDISK_VERSION=$(jq -r '.[1] | "\(.arch)"' info.json)
|
if [ ${{ matrix.arch }} == linux/amd64 ]; then
|
||||||
BAIDUNETDISK_URL=$(jq -r '.[1] | "\(.url)"' info.json)
|
BAIDUNETDISK_VERSION=$(jq -r '.[1] | "\(.version)"' info.json);
|
||||||
|
BAIDUNETDISK_URL=$(jq -r '.[1] | "\(.url)"' info.json);
|
||||||
|
fi
|
||||||
|
if [ ${{ matrix.arch }} == linux/arm64 ]; then
|
||||||
|
BAIDUNETDISK_VERSION=$(jq -r '.[2] | "\(.version)"' info.json);
|
||||||
|
BAIDUNETDISK_URL=$(jq -r '.[2] | "\(.url)"' info.json);
|
||||||
|
fi
|
||||||
GITHUB_REF=${{ github.ref }}
|
GITHUB_REF=${{ github.ref }}
|
||||||
BRACH=${GITHUB_REF#refs/heads/}
|
BRACH=${GITHUB_REF#refs/heads/}
|
||||||
DATE=$(date '+%Y-%m-%dT%H:%M:%S%Z')
|
DATE=$(date '+%Y-%m-%dT%H:%M:%S%Z')
|
||||||
@ -76,7 +90,7 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
platforms: |
|
platforms: |
|
||||||
linux/amd64
|
${{ matrix.arch }}
|
||||||
push: true
|
push: true
|
||||||
build-args: |
|
build-args: |
|
||||||
BUILD_DATE=${{ steps.set-vars.outputs.DATE }}
|
BUILD_DATE=${{ steps.set-vars.outputs.DATE }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user