Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ jobs:
timeout-minutes: 10
needs:
- build
- update-helm

steps:
- uses: re-actors/alls-green@release/v1
id: alls-green
with:
jobs: ${{ toJSON(needs) }}
allowed-skips: clean
allowed-skips: clean, update-helm
- if: always() && github.ref == 'refs/heads/main'
continue-on-error: true
uses: posit-dev/images-shared/.github/actions/slack-build-notify@main
Expand Down Expand Up @@ -65,6 +66,46 @@ jobs:
# Push images only for merges into main and weekly schduled re-builds.
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }}

update-helm:
name: Update Helm
if: ${{ needs.build.result == 'success' && (github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') }}
needs:
- build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Install bakery
uses: posit-dev/images-shared/setup-bakery@main

- name: Get latest version
id: version
run: |
APP_VERSION=$(bakery get version connect)
APP_VERSION="${APP_VERSION%%[+-]*}"
echo "app-version=$APP_VERSION" >> "$GITHUB_OUTPUT"

- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ secrets.POSIT_CONNECT_PROJECTS_APP_ID }}
private-key: ${{ secrets.POSIT_CONNECT_PROJECTS_PEM }}
owner: rstudio
repositories: helm

- name: Dispatch Helm update
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
APP_VERSION: ${{ steps.version.outputs.app-version }}
run: |
gh workflow run product-release.yml \
--repo rstudio/helm \
--field product=connect \
--field version="$APP_VERSION"

clean:
name: Clean
if: always() && github.ref == 'refs/heads/main'
Expand Down
Loading