File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,11 +29,13 @@ jobs:
2929 timeout-minutes : 10
3030 needs :
3131 - build
32+ - update-helm
3233
3334 steps :
3435 - uses : re-actors/alls-green@release/v1
3536 with :
3637 jobs : ${{ toJSON(needs) }}
38+ allowed-skips : update-helm
3739
3840 build :
3941 name : Build
5759 # Push images only for merges into main and weekly schduled re-builds.
5860 push : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'schedule' }}
5961
62+ update-helm :
63+ name : Update Helm
64+ if : ${{ needs.build.result == 'success' && (github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') }}
65+ needs :
66+ - build
67+ runs-on : ubuntu-latest
68+
69+ steps :
70+ - name : Checkout
71+ uses : actions/checkout@v6
72+
73+ - name : Install bakery
74+ uses : posit-dev/images-shared/setup-bakery@main
75+
76+ - name : Get latest version
77+ id : version
78+ run : |
79+ APP_VERSION=$(bakery get version workbench)
80+ APP_VERSION="${APP_VERSION%%[+-]*}"
81+ echo "app-version=$APP_VERSION" >> "$GITHUB_OUTPUT"
82+
83+ - name : Generate GitHub App Token
84+ id : app-token
85+ uses : actions/create-github-app-token@v3
86+ with :
87+ app-id : ${{ secrets.APP_ID }}
88+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
89+ owner : rstudio
90+ repositories : helm
91+
92+ - name : Dispatch Helm update
93+ env :
94+ GH_TOKEN : ${{ steps.app-token.outputs.token }}
95+ APP_VERSION : ${{ steps.version.outputs.app-version }}
96+ run : |
97+ gh workflow run product-release.yml \
98+ --repo rstudio/helm \
99+ --field product=workbench \
100+ --field version="$APP_VERSION"
101+
60102 clean :
61103 name : Clean
62104 if : always() && github.ref == 'refs/heads/main'
You can’t perform that action at this time.
0 commit comments