Skip to content

EXUI-266: Configure github action to update preview deployment id #35

EXUI-266: Configure github action to update preview deployment id

EXUI-266: Configure github action to update preview deployment id #35

name: Populate Preview Deployment ID
on:
pull_request:
branches:
- master
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.HMCTS_GITHUB_EXUI_APP_ID }}
private_key: ${{ secrets.HMCTS_GITHUB_EXUI_PRIVATE_KEY }}
- uses: actions/checkout@v3
with:
token: ${{ steps.generate-token.outputs.token }}
- name: Populate preview deployment ID
run: |
sed -i 's/PREVIEW_DEPLOYMENT_ID:.*/PREVIEW_DEPLOYMENT_ID: exui-preview-deployment-${{ github.event.number }}/' charts/xui-webapp/values.preview.template.yaml
shell: bash
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "${{ github.ref }}: Setting Preview Deployment ID"