-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): introduce branch / tags-driven indexing CI
- Loading branch information
1 parent
32b9545
commit 5d54657
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Index blueprints | ||
|
||
on: | ||
push: | ||
branches: | ||
- latest-stable | ||
- develop | ||
tags: | ||
- v* | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
index-blueprints: | ||
name: Index blueprints | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- name: Extract version to index | ||
id: extract-version | ||
run: | | ||
REF=${GITHUB_REF#refs/} | ||
echo $REF | ||
if [[ $REF == 'heads/latest-stable' ]]; then | ||
echo "version=v$(curl -s https://api.kestra.io/v1/versions/latest | jq -r '.version')" >> $GITHUB_OUTPUT | ||
elif [[ $REF == 'heads/develop' ]]; then | ||
echo "version=v$(curl -s https://api.kestra.io/v1/versions/latest?snapshot=true | jq -r '.version')" >> $GITHUB_OUTPUT | ||
elif [[ $REF == 'tags/v'* ]]; then | ||
echo "version=${REF#tags/}" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Blueprints indexing webhook for tag | ||
id: trigger-index | ||
run: | | ||
echo ${{steps.extract-version.outputs.version}} | ||
curl -X POST -H "Content-Type: application/json" -d "{\"tag\": \"${{steps.vars.outputs.version}}\", \"to_index\": [\"blueprints\"]}" https://us.kestra.cloud/api/v1/kestra-tech/executions/webhook/product/indexing/${{ secrets.DOC_INDEXING_WEBHOOK }} |