Skip to content

build

build #7

Workflow file for this run

#
# Copyright (C) 2022 Ing <https://github.com/wjz304>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
name: build
on:
workflow_dispatch:
inputs:
tag:
description: "tag"
required: false
type: string
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x64-7.1, aarch64-7.1]
steps:
- name: Checkout
uses: actions/checkout@main
- 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"
- name: Checkout SynoCommunity Source and Docker Image
run: |
docker pull ghcr.io/synocommunity/spksrc
git clone --depth=1 https://github.com/SynoCommunity/spksrc.git
cp -rf src/* spksrc
- name: Build Package
run: |
ROOT_PATH="${{ github.workspace }}"
MAKE_ARCH="arch-${{ matrix.target }}"
docker run -v ${ROOT_PATH}/spksrc:/spksrc -w /spksrc/spk/open-vm-tools ghcr.io/synocommunity/spksrc make ${MAKE_ARCH}
- name: Upload to Artifacts
if: inputs.tag == ''
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: |
spksrc/packages/*.spk
retention-days: 5
- name: Release
if: inputs.tag != ''
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag }}
files: spksrc/packages/*.spk