Merge branch 'master' into EXUI-266 #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Populate Preview Deployment ID | |
on: | |
pull_request: | |
branches: | |
- master | |
env: | |
GITHUB_PR_BRANCH: ${{ github.ref }} | |
GITHUB_PR_NUMBER: ${{ github.event.number }} | |
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 }} | |
ref: master | |
- bash: | | |
CHART_DIRECTORY="${chartPath}" | |
BRANCH="${chartBranch}" | |
BRANCH_PR_NUMBER="${branchPrNumber}" | |
## Move to root | |
cd ${CHART_DIRECTORY} | |
sed -i -e "s/^PREVIEW_DEPLOYMENT_ID:.*/PREVIEW_DEPLOYMENT_ID: exui-preview-deployment-BRANCH_PR_NUMBER/" "${CHART_DIRECTORY}/charts/xui-webapp/values.preview.template.yaml" | |
exit 1 | |
env: | |
chartPath: ${{ github.workspace }} | |
chartBranch: ${{ github.ref }} | |
branchPrNumber: ${{ github.event.number }} | |
- name: Commit | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
skip_dirty_check: false | |
commit_message: "Setting Preview Deployment ID" | |
branch: master |