Skip to content

Commit cdd9959

Browse files
committed
ci(krew): fix release-plz tag detection and add manual dispatch
1 parent 7596427 commit cdd9959

3 files changed

Lines changed: 28 additions & 8 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ci-flow
1+
name: ci
22

33
on:
44
pull_request:

.github/workflows/krew-update.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: krew-update
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- '[0-9]*.[0-9]*.[0-9]*'
8+
9+
jobs:
10+
krew-update:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.repository_owner == 'davidB' }}
13+
permissions:
14+
contents: read
15+
steps:
16+
- uses: actions/checkout@v6
17+
with:
18+
fetch-depth: 0
19+
- uses: rajatjindal/krew-release-bot@c970b8a8f6dbc2f2285a26e3ae160903b87002c3 # v0.0.51
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-plz.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,14 @@ jobs:
9494
- run: ${SCCACHE_PATH} --show-stats
9595
shell: bash
9696

97-
krew-update:
97+
trigger-krew-update:
9898
needs: [release, build]
9999
if: needs.release.outputs.releases_created == 'true'
100100
runs-on: ubuntu-latest
101101
permissions:
102-
contents: read
102+
actions: write
103103
steps:
104-
- uses: actions/checkout@v6
105-
with:
106-
ref: ${{ needs.release.outputs.tag }}
107-
fetch-depth: 0
108-
- uses: rajatjindal/krew-release-bot@v0.0.51
104+
- run: gh workflow run krew-update.yaml --ref "$TAG"
105+
env:
106+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107+
TAG: ${{ needs.release.outputs.tag }}

0 commit comments

Comments
 (0)