mirror of
https://github.com/AuxXxilium/synology-dsm-open-vm-tools.git
synced 2024-11-23 23:00:59 +07:00
build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
23a1f4db51
commit
a9fcef1257
120
.github/workflows/build.yml
vendored
120
.github/workflows/build.yml
vendored
@ -3,17 +3,85 @@ name: build
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "tag"
|
||||
version:
|
||||
description: "format %y.%-m.$i or auto"
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
target: [geminilake-7.1]
|
||||
include:
|
||||
- version: 7.1
|
||||
platform: apollolake
|
||||
parm: "4.4.180"
|
||||
- version: 7.1
|
||||
platform: broadwell
|
||||
parm: "4.4.180"
|
||||
- version: 7.1
|
||||
platform: broadwellnk
|
||||
parm: "4.4.180"
|
||||
- version: 7.1
|
||||
platform: broadwellnkv2
|
||||
parm: "4.4.180"
|
||||
- version: 7.1
|
||||
platform: denverton
|
||||
parm: "4.4.180"
|
||||
- version: 7.1
|
||||
platform: epyc7002
|
||||
parm: "5.10.55"
|
||||
- version: 7.1
|
||||
platform: geminilake
|
||||
parm: "4.4.180"
|
||||
- version: 7.1
|
||||
platform: purley
|
||||
parm: "4.4.180"
|
||||
- version: 7.1
|
||||
platform: r1000
|
||||
parm: "4.4.180"
|
||||
- version: 7.1
|
||||
platform: v1000
|
||||
parm: "4.4.180"
|
||||
#- version: 7.1
|
||||
# platform: kvmx64
|
||||
# parm: "4.4.180"
|
||||
|
||||
- version: 7.2
|
||||
platform: apollolake
|
||||
parm: "4.4.302"
|
||||
- version: 7.2
|
||||
platform: broadwell
|
||||
parm: "4.4.302"
|
||||
- version: 7.2
|
||||
platform: broadwellnk
|
||||
parm: "4.4.302"
|
||||
- version: 7.2
|
||||
platform: broadwellnkv2
|
||||
parm: "4.4.302"
|
||||
- version: 7.2
|
||||
platform: denverton
|
||||
parm: "4.4.302"
|
||||
- version: 7.2
|
||||
platform: epyc7002
|
||||
parm: "5.10.55"
|
||||
- version: 7.2
|
||||
platform: geminilake
|
||||
parm: "4.4.302"
|
||||
- version: 7.2
|
||||
platform: purley
|
||||
parm: "4.4.302"
|
||||
- version: 7.2
|
||||
platform: r1000
|
||||
parm: "4.4.302"
|
||||
- version: 7.2
|
||||
platform: v1000
|
||||
parm: "4.4.302"
|
||||
#- version: 7.2
|
||||
# platform: kvmx64
|
||||
# parm: "4.4.302"
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -21,9 +89,9 @@ jobs:
|
||||
|
||||
- name: Init Env
|
||||
run: |
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "github-actions[bot]"
|
||||
sudo timedatectl set-timezone "Asia/Shanghai"
|
||||
git config --global user.email "info@auxxxilium.tech"
|
||||
git config --global user.name "AuxXxilium"
|
||||
sudo timedatectl set-timezone "Europe/Berlin"
|
||||
|
||||
- name: Checkout Synology Community Source and Docker Image
|
||||
run: |
|
||||
@ -36,21 +104,45 @@ jobs:
|
||||
- name: Build Package
|
||||
run: |
|
||||
ROOT_PATH="${{ github.workspace }}"
|
||||
MAKE_ARCH="arch-${{ matrix.target }}"
|
||||
MAKE_ARCH="arch-${{ matrix.platform }}-${{ matrix.version }}"
|
||||
docker run -v ${ROOT_PATH}/spksrc:/spksrc -w /spksrc/spk/open-vm-tools ghcr.io/synocommunity/spksrc make ${MAKE_ARCH}
|
||||
|
||||
- name: Calculate Version
|
||||
run: |
|
||||
# Calculate Version
|
||||
VERSION=""
|
||||
if [ -n "${{ inputs.version }}" ]; then
|
||||
VERSION="${{ inputs.version }}"
|
||||
else
|
||||
LATEST_TAG="`curl -skL "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r ".tag_name" 2>/dev/null`"
|
||||
if [[ -n "${LATEST_TAG}" && "`echo ${LATEST_TAG} | cut -d '.' -f 1,2`" = "`date +'%y.%-m.%-d'`" ]]; then # format %y.%-m.$i
|
||||
VERSION="`echo ${LATEST_TAG} | awk -F '.' '{$3=$3+1}1' OFS='.'`"
|
||||
else
|
||||
VERSION="`date +'%y.%-m.%-d'`"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "${VERSION}" ]; then
|
||||
# Modify Source File
|
||||
echo "Version: ${VERSION}"
|
||||
echo "${VERSION}" >VERSION
|
||||
echo "${VERSION}" >"./output/VERSION"
|
||||
echo "VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Upload to Artifacts
|
||||
if: inputs.tag == ''
|
||||
if: success() && env.VERSION == ''
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.target }}
|
||||
name: ${{ matrix.platform }}-${{ matrix.version }}
|
||||
path: |
|
||||
spksrc/packages/*.spk
|
||||
retention-days: 5
|
||||
|
||||
- name: Release
|
||||
if: inputs.tag != ''
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: success() && env.VERSION != ''
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
tag_name: ${{ inputs.tag }}
|
||||
files: spksrc/packages/*.spk
|
||||
tag: ${{ env.VERSION }}
|
||||
allowUpdates: true
|
||||
artifacts: spksrc/packages/*.spk
|
||||
|
Loading…
Reference in New Issue
Block a user