Merge pull request #2744 from ministryofjustice/feature/aps-1733-simp… #320
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: Generate UI Types | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/main/resources/static/codegen/built-cas2-api-spec.yml' | |
jobs: | |
generate-ui: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate Token | |
uses: tibdex/github-app-token@v1 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.APP_ID }} | |
private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Trigger CAS-2 UI Type Generation Workflow | |
if: ${{ github.ref == 'refs/heads/main' }} | |
id: sa-trigger-ui-workflow | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ steps.generate-token.outputs.token }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: context.repo.owner, | |
repo: 'hmpps-community-accommodation-tier-2-ui', | |
workflow_id: 'generate-types.yml', | |
ref: 'main' | |
}) |