Skip to content

Commit 5bbf6fc

Browse files
committed
fix: pass release tag as input to deploy workflow
workflow_dispatch requires the workflow file at the target ref to have the trigger. Release tags point to commits before the trigger was added, so dispatching against a tag fails. Instead, dispatch from main and pass the tag as an input, then checkout that tag explicitly. Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent 698f956 commit 5bbf6fc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3131
run: >
3232
gh workflow run release.yml
33-
--ref ${{ steps.release-please.outputs.tag_name }}
33+
-f tag=${{ steps.release-please.outputs.tag_name }}

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
name: Deploy to Maven Central
33

44
on:
5-
workflow_dispatch: {}
5+
workflow_dispatch:
6+
inputs:
7+
tag:
8+
description: "Release tag to deploy (e.g. v1.5.1)"
9+
required: true
610

711
jobs:
812
deploy:
@@ -20,6 +24,7 @@ jobs:
2024
- name: Checkout Plugin Repository
2125
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2226
with:
27+
ref: ${{ inputs.tag }}
2328
persist-credentials: false
2429

2530
- uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3.6.3

0 commit comments

Comments
 (0)