diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9550610..f50cd92 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,8 +3,7 @@ name: Index blueprints on: push: branches: - - latest-stable - - develop + - main tags: - v* @@ -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 }} \ No newline at end of file + 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 }} \ No newline at end of file