feat: add blueprint on python command that can take an input using an… #55
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
name: Index blueprints | |
on: | |
push: | |
branches: | |
- main | |
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/} | |
if [[ $REF == 'heads/main' ]]; then | |
echo "version=v$(curl -s https://api.kestra.io/v1/versions/latest | jq -r '.version')" >> $GITHUB_OUTPUT | |
echo "snapshot_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: | | |
curl -X POST -H "Content-Type: application/json" -d "{\"tag\": \"${{steps.extract-version.outputs.version}}\", \"to_index\": [\"blueprints\"]}" ${{ secrets.DOC_INDEXING_WEBHOOK }} | |
curl -X POST -H "Content-Type: application/json" -d "{\"tag\": \"${{steps.extract-version.outputs.snapshot_version}}\", \"to_index\": [\"blueprints\"]}" ${{ secrets.DOC_INDEXING_WEBHOOK }} |