Skip to content

Commit 43273ee

Browse files
committed
Trigger Argo workflow run on push to main
1 parent 3825d19 commit 43273ee

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

.github/workflows/push.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
plugin-version-suffix: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || '' }}
2323

2424
publish-latest-to-catalog:
25-
name: Publish `main` to Dev Catalog
25+
name: Publish main to Dev Catalog
2626
if: github.ref == 'refs/heads/main'
2727
uses: grafana/plugin-ci-workflows/.github/workflows/cd.yml@ci-cd-workflows/v5.1.0
2828
permissions:
@@ -38,3 +38,32 @@ jobs:
3838
plugin-version-suffix: ${{ github.sha }}
3939
run-playwright: false
4040
scopes: grafana_cloud_instance_datasourcese2e
41+
42+
trigger-argo-workflow:
43+
name: Trigger Argo Workflow
44+
runs-on: ubuntu-24.04
45+
permissions:
46+
contents: read
47+
id-token: write
48+
steps:
49+
- uses: actions/checkout@v6
50+
with:
51+
persist-credentials: false
52+
- name: Read plugin ID
53+
id: plugin-id
54+
run: |
55+
echo "PLUGIN_ID=$(jq -r .id < ./src/plugin.json)" >> $GITHUB_OUTPUT
56+
- name: Read package version
57+
id: package-version
58+
run: |
59+
echo "PACKAGE_VERSION=$(jq -r .version < ./package.json)" >> $GITHUB_OUTPUT
60+
- name: Trigger workflow
61+
uses: grafana/shared-workflows/actions/trigger-argo-workflow@d29b9161f1803baed4a7305c85cb5a3018bc3c3e # trigger-argo-workflow/v1.2.1
62+
with:
63+
instance: dev
64+
namespace: grafana-datasources-cd
65+
workflow_template: ${{ steps.plugin-id.outputs.PLUGIN_ID }}
66+
parameters: |
67+
dockertag=${{ steps.package-version.outputs.PACKAGE_VERSION }}-${{ github.sha }}
68+
prCommentContext='triggered by push to main on datasource: ${{ steps.plugin-id.outputs.PLUGIN_ID }}'
69+
commit_author="grafana-delivery-bot"

0 commit comments

Comments
 (0)