Skip to content

Update Chart Versions #101

Update Chart Versions

Update Chart Versions #101

Workflow file for this run

on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
name: Update Chart Versions
jobs:
update-chart-versions:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/[email protected]
with:
node-version: "14"
- name: Fetch Latest Flipt Release Tag
id: fetch_tag
env:
GH_TOKEN: ${{ github.token }}
run: |
tag=$(gh release view -R flipt-io/flipt --json tagName | jq -r .tagName)
echo "tag=${tag}" >> $GITHUB_OUTPUT
- name: Update Chart Versions
id: update_chart
run: |
tag="${{ steps.fetch_tag.outputs.tag }}"
pushd scripts/bumpVersion
npm install
npm run bump ../../charts/flipt/Chart.yaml "${tag}"
popd
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.FLIPT_RELEASE_BOT_APP_ID }}
private_key: ${{ secrets.FLIPT_RELEASE_BOT_APP_PEM }}
installation_id: ${{ secrets.FLIPT_RELEASE_BOT_INSTALLATION_ID }}
- name: Open PR
env:
GIT_AUTHOR_NAME: flipt-bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: flipt-bot
GIT_COMMITTER_EMAIL: [email protected]
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
tag="${{ steps.fetch_tag.outputs.tag }}"
git checkout -b "update/${tag}"
git add charts/flipt/Chart.yaml
git commit -m "feat: update Flipt version to release ${tag}"
git push origin "update/${tag}"
gh pr create --title "feat: update Flipt version to release ${tag}" \
--body "Updating chart to Flipt release [${tag}](https://github.com/flipt-io/flipt/releases/tag/${tag})."