mirror of
https://github.com/AuxXxilium/synology-igc.git
synced 2024-11-23 23:11:07 +07:00
add trigger of tag (#7)
This commit is contained in:
parent
b417643e6b
commit
ba5d253861
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
@ -8,7 +8,10 @@
|
||||
|
||||
name: Build
|
||||
on:
|
||||
# push:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
@ -56,10 +59,14 @@ jobs:
|
||||
NEW_TAG=$(increment_version ${CUR_TAG})
|
||||
echo CUR_TAG: ${CUR_TAG} NEW_TAG:${NEW_TAG}
|
||||
|
||||
if [ -n "${{ inputs.version }}" ]; then
|
||||
echo "new_tag=${{ inputs.version }}" >> $GITHUB_ENV
|
||||
if [ ${{ github.event_name }} == 'push' -a ${{ github.ref_type }} == 'tag' ]; then
|
||||
echo "new_tag=${{ github.ref_name }}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "new_tag=${NEW_TAG}" >> $GITHUB_ENV
|
||||
if [ -n "${{ inputs.version }}" ]; then
|
||||
echo "new_tag=${{ inputs.version }}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "new_tag=${NEW_TAG}" >> $GITHUB_ENV
|
||||
fi
|
||||
fi
|
||||
|
||||
echo 'git_log<<EOF' >> $GITHUB_ENV
|
||||
@ -74,6 +81,8 @@ jobs:
|
||||
|
||||
- name: Build igc for ${{matrix.platform}}
|
||||
run: |
|
||||
echo new_tag: ${{ env.new_tag }}
|
||||
|
||||
mkdir ./${{matrix.platform}} && chmod 777 ./${{matrix.platform}}
|
||||
sudo docker run -u 1000 --rm -t -v "${PWD}":/input -v "${PWD}/${{matrix.platform}}":/output fbelavenuto/syno-compiler compile-module ${{matrix.platform}}
|
||||
|
||||
@ -107,6 +116,13 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@main
|
||||
|
||||
- name: git switch
|
||||
if: github.event_name == 'push' && github.ref_type == 'tag'
|
||||
run: |
|
||||
git fetch
|
||||
git branch -a
|
||||
git checkout --progress --force main
|
||||
|
||||
- name: Init Env
|
||||
run: |
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
Loading…
Reference in New Issue
Block a user