ci: Only trigger builds on manual push
This commit is contained in:
@@ -27,7 +27,8 @@ jobs:
|
||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
|
||||
git remote add -f --tags remote https://git.ffmpeg.org/ffmpeg.git
|
||||
git fetch --all
|
||||
- name: "Update Branches and Trigger Builds"
|
||||
- name: "Synchronize with Remote and trigger Builds"
|
||||
if: ${{ github.event_name == 'schedule' }}
|
||||
shell: bash
|
||||
run: |
|
||||
declare -a BRANCHES
|
||||
@@ -85,3 +86,20 @@ jobs:
|
||||
"https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yml/dispatches"
|
||||
fi
|
||||
done
|
||||
- name: "Only trigger build on manual push"
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
shell: bash
|
||||
run: |
|
||||
declare -a BRANCHES
|
||||
BRANCHES[${#BRANCHES[@]}]="master"
|
||||
BRANCHES[${#BRANCHES[@]}]="release/4.4"
|
||||
BRANCHES[${#BRANCHES[@]}]="release/3.4"
|
||||
|
||||
for d in ${BRANCHES[@]}; do
|
||||
curl \
|
||||
-X POST \
|
||||
-H "Authorization: token ${{ secrets.WORKFLOW_TOKEN }}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-d "{\"ref\":\"${{ github.ref }}\",\"inputs\":{\"ref\":\"${d}\"}}" \
|
||||
"https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yml/dispatches"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user