Chore: [AEA-0000] - use new exports #9009
This file contains hidden or 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: pr | |
| on: | |
| pull_request: | |
| branches: [main] | |
| permissions: {} | |
| jobs: | |
| get_config_values: | |
| uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@bda627e2ce1a32ea56bcc815aec57b06cfa63c9d | |
| permissions: | |
| attestations: read | |
| contents: read | |
| packages: read | |
| with: | |
| verify_published_from_main_image: false | |
| quality_checks: | |
| uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@bda627e2ce1a32ea56bcc815aec57b06cfa63c9d | |
| needs: [get_config_values] | |
| permissions: | |
| contents: read | |
| id-token: write | |
| packages: read | |
| with: | |
| pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} | |
| secrets: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| pr_title_format_check: | |
| uses: NHSDigital/eps-common-workflows/.github/workflows/pr_title_check.yml@bda627e2ce1a32ea56bcc815aec57b06cfa63c9d | |
| permissions: | |
| pull-requests: write | |
| package_code: | |
| uses: ./.github/workflows/sam_package_code.yml | |
| needs: get_config_values | |
| permissions: | |
| contents: read | |
| id-token: write | |
| packages: read | |
| with: | |
| pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} | |
| package_cdk_code: | |
| uses: ./.github/workflows/cdk_package_code.yml | |
| needs: get_config_values | |
| permissions: | |
| contents: read | |
| id-token: write | |
| packages: read | |
| with: | |
| pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} | |
| get_issue_number: | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| issue_number: ${{steps.get_issue_number.outputs.result}} | |
| steps: | |
| - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 | |
| name: get issue number | |
| id: get_issue_number | |
| with: | |
| script: | | |
| if (context.issue.number) { | |
| // Return issue number if present | |
| return context.issue.number; | |
| } else { | |
| // Otherwise return issue number from commit | |
| return ( | |
| await github.rest.repos.listPullRequestsAssociatedWithCommit({ | |
| commit_sha: context.sha, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| }) | |
| ).data[0].number; | |
| } | |
| result-encoding: string | |
| tag_release: | |
| needs: [get_config_values] | |
| uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@bda627e2ce1a32ea56bcc815aec57b06cfa63c9d | |
| permissions: | |
| id-token: write | |
| contents: write | |
| packages: write | |
| with: | |
| dry_run: true | |
| pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} | |
| branch_name: ${{ github.event.pull_request.head.ref }} | |
| tag_format: ${{ needs.get_config_values.outputs.TAG_FORMAT }} | |
| get_commit_id: | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| commit_id: ${{ steps.commit_id.outputs.commit_id }} | |
| steps: | |
| - name: Get Commit ID | |
| id: commit_id | |
| run: | | |
| echo "commit_id=${{ github.sha }}" >> "$GITHUB_OUTPUT" | |
| deploy_stacks: | |
| needs: [quality_checks, package_code, package_cdk_code, get_issue_number, tag_release, get_commit_id, get_config_values] | |
| uses: ./.github/workflows/release_all_stacks.yml | |
| permissions: | |
| id-token: write | |
| contents: write | |
| with: | |
| target_environment: dev | |
| version: pr-${{github.event.number}} | |
| change_set_version: pr-${{github.event.number}} | |
| execute_change_set: false | |
| lambda_stack_suffix: -pr-${{needs.get_issue_number.outputs.issue_number}} | |
| artifact_bucket_prefix: PR-${{needs.get_issue_number.outputs.issue_number}} | |
| version_number: PR-${{ needs.get_issue_number.outputs.issue_number }} | |
| commit_id: ${{ needs.get_commit_id.outputs.commit_id }} | |
| lambda_insights_log_group_name: /aws/lambda-insights/pr-${{ needs.get_issue_number.outputs.issue_number }} | |
| deploy_artillery: true | |
| deploy_drift_detection: false | |
| is_pull_request: true | |
| pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} | |
| secrets: | |
| cf_create_changeset_role: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }} | |
| cf_deploy_role: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }} |