From e066167d2b9ca052d9fb36aeb7dd3c347f2509a2 Mon Sep 17 00:00:00 2001 From: "brian.mulier" Date: Mon, 9 Dec 2024 20:43:04 +0100 Subject: [PATCH] fix(ci): single branch indexing setup --- .github/workflows/main.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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