Skip to content

Commit

Permalink
fix(ci): single branch indexing setup
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-mulier-p committed Dec 9, 2024
1 parent a7392c2 commit e066167
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Index blueprints
on:
push:
branches:
- latest-stable
- develop
- main
tags:
- v*

Expand All @@ -21,14 +20,14 @@ jobs:
id: extract-version
run: |
REF=${GITHUB_REF#refs/}
if [[ $REF == 'heads/latest-stable' ]]; then
if [[ $REF == 'heads/main' ]]; 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
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.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 }}

0 comments on commit e066167

Please sign in to comment.