Skip to content

Commit 31c49f1

Browse files
committed
add an adhoc chart-releaser that is triggered by the /release-adhoc issue comment
This allows for releasing (in an adhoc fashion) from a branch. Unfortunately the behavior and how this will work for non-devel releases is not super well-defined. If chart-releaser adds support for filtering to only certain releases, that would be helpful to make this safer: helm/chart-releaser#196 In particular, it is most concerning if chart A moves to `--devel` version on the `dev` branch, chart B moves to a newer version on `main`, and then CI runs. It would also be concerning if chart A or chart B move to a newer version on a branch and then publish a "non-devel" version from the branch.
1 parent d064e81 commit 31c49f1

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
name: Release Charts (adhoc)
3+
4+
on:
5+
issue_comment:
6+
types: [created]
7+
8+
jobs:
9+
release:
10+
# from https://docs.github.com/en/graphql/reference/enums#commentauthorassociation
11+
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/release-adhoc') }}
12+
name: release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Configure Git
21+
run: |
22+
git config user.name "$GITHUB_ACTOR"
23+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
24+
25+
- name: Install Helm
26+
uses: azure/setup-helm@v1
27+
with:
28+
version: v3.6.3
29+
30+
- name: Run chart-releaser
31+
uses: helm/chart-releaser-action@v1.2.0
32+
with:
33+
charts_repo_url: https://helm.rstudio.com
34+
env:
35+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
36+
37+
- name: Run chart-releaser (other)
38+
uses: helm/chart-releaser-action@v1.2.0
39+
with:
40+
charts_dir: other-charts
41+
charts_repo_url: https://helm.rstudio.com
42+
env:
43+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)