diff --git a/.github/workflows/dockerpublish.yml b/.github/workflows/dockerpublish.yml index 95b354d..5c2f816 100644 --- a/.github/workflows/dockerpublish.yml +++ b/.github/workflows/dockerpublish.yml @@ -16,7 +16,7 @@ env: # github.repository as / IMAGE_NAME: ${{ github.repository }} RELEASE_TAG: ${{ github.event.release.tag_name }} - PLUGIN_VERSION: 1.0.7 + PLUGIN_VERSION: 1.0.8 jobs: build: diff --git a/.github/workflows/publish-ghcr.yml b/.github/workflows/publish-ghcr.yml index 49870e2..731bad6 100644 --- a/.github/workflows/publish-ghcr.yml +++ b/.github/workflows/publish-ghcr.yml @@ -11,7 +11,7 @@ env: # github.repository as / IMAGE_NAME: ${{ github.repository }} RELEASE_TAG: ${{ github.event.release.tag_name }} - PLUGIN_VERSION: 1.0.7 + PLUGIN_VERSION: 1.0.8 jobs: build-and-push: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1ab890..2471734 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,12 +43,38 @@ jobs: npm run build shell: bash - - name: Build and test frontend run: | cd /home/runner/work/Grafana.Plugin.CostManagement/Grafana.Plugin.CostManagement/dfe-azurecostbackend-datasource npm run build + - name: Install jq + run: sudo apt-get install jq + + - name: Read existing plugin.json + run: | + file_path="/home/runner/work/Grafana.Plugin.CostManagement/Grafana.Plugin.CostManagement/dfe-azurecostbackend-datasource/dist/plugin.json" + existing_json=$(cat "$file_path") + echo "Existing JSON:" + echo "$existing_json" + + - name: Add alerting is true to plugin.json + run: | + new_json=$(echo "$existing_json" | jq '. + { "alerting": true }') + echo "Modified JSON:" + echo "$new_json" + + - name: Save modified JSON back to the file + run: echo "$new_json" > "$file_path" + + - name: Display modified JSON + run: cat "$file_path" + + - name: Stop Workflow After Showing json + if: always() # Change this condition as needed + run: echo "Stopping workflow after After Showing json" + + - name: Check for backend id: check-for-backend run: |