mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Created workflow to trigger rebuild of all grav skeletons
This commit is contained in:
parent
470894577d
commit
04567817b2
45
.github/workflows/trigger-skeletons.yml
vendored
Normal file
45
.github/workflows/trigger-skeletons.yml
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
name: Trigger Skeletons Build
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [ published ]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Which Grav release to use'
|
||||
required: true
|
||||
default: 'latest'
|
||||
admin:
|
||||
description: 'Create also a package with Admin'
|
||||
required: true
|
||||
default: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
WORKFLOW: "build-skeleton.yml"
|
||||
AUTH: ":${{secrets.GLOBAL_TOKEN}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Make it rain ☔️
|
||||
run: |
|
||||
SKELETONS=`curl -s "${{secrets.SKELETONS_JSON_LIST}}"`
|
||||
echo "$SKELETONS"
|
||||
echo "$SKELETONS" | jq -cr '.[]' | while read SKELETON; do
|
||||
KEY=$(echo "$SKELETON" | jq -cr 'keys[0]')
|
||||
VERSION=$(echo "$SKELETON" | jq -cr '.[]')
|
||||
URL="https://api.github.com/repos/${KEY}/actions/workflows/${WORKFLOW}/dispatches"
|
||||
|
||||
curl -XPOST -u "${AUTH}" \
|
||||
-H "Accept: application/vnd.github.everest-preview+json" \
|
||||
-H "Content-Type: application/json" ${URL} \
|
||||
--data '{ "ref": "master",
|
||||
"inputs": {
|
||||
"tag": "'"$VERSION"'"",
|
||||
"version": "'"$INPUT_VERSION"'",
|
||||
"admin": "'"$INPUT_ADMIN"'"
|
||||
}
|
||||
}'
|
||||
echo "Dispatched Worfklow for ${KEY}@$VERSION"
|
||||
done
|
||||
Loading…
Reference in New Issue
Block a user