Skip to content

Commit

Permalink
add "alerting": true to plugin.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Belton-gov committed Jan 26, 2024
1 parent 1785b61 commit 63ff31a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dockerpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
PLUGIN_VERSION: 1.0.7
PLUGIN_VERSION: 1.0.8

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
# github.repository as <account>/<repo>
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:
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit 63ff31a

Please sign in to comment.