|
8 | 8 | BRANCH_NAME: ${{ github.ref_name }} |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - get_commit_id: |
12 | | - runs-on: ubuntu-22.04 |
13 | | - outputs: |
14 | | - commit_id: ${{ steps.commit_id.outputs.commit_id }} |
15 | | - sha_short: ${{ steps.commit_id.outputs.sha_short }} |
16 | | - |
17 | | - steps: |
18 | | - - name: Checkout code |
19 | | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
20 | | - with: |
21 | | - ref: ${{ env.BRANCH_NAME }} |
22 | | - |
23 | | - - name: Get Commit ID |
24 | | - id: commit_id |
25 | | - run: | |
26 | | - # echo "commit_id=${{ github.sha }}" >> "$GITHUB_ENV" |
27 | | - echo "commit_id=${{ github.sha }}" >> "$GITHUB_OUTPUT" |
28 | | - echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" |
29 | 11 | get_config_values: |
30 | 12 | uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@b0172dbdb3af4ae232873106553c316d79d784fc |
31 | 13 | with: |
32 | 14 | verify_published_from_main_image: true |
33 | 15 | quality_checks: |
34 | 16 | uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@352f15f692c23b18f67215ad858f27b06a878717 |
35 | | - needs: [get_config_values, get_commit_id] |
| 17 | + needs: [get_config_values] |
36 | 18 | with: |
37 | 19 | pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} |
38 | | - run_docker_scan: true |
39 | | - docker_images: "eps-cdk-utils" |
| 20 | + run_docker_scan: false |
40 | 21 | secrets: |
41 | 22 | SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
42 | 23 |
|
43 | 24 | tag_release: |
44 | | - needs: [quality_checks, get_commit_id, get_config_values] |
| 25 | + needs: [quality_checks, get_config_values] |
45 | 26 | uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@352f15f692c23b18f67215ad858f27b06a878717 |
46 | 27 | with: |
47 | 28 | dry_run: true |
|
51 | 32 | tag_format: ${{ needs.get_config_values.outputs.tag_format }} |
52 | 33 | secrets: inherit |
53 | 34 |
|
54 | | - package_code: |
55 | | - needs: [tag_release, quality_checks, get_commit_id, get_config_values] |
56 | | - uses: ./.github/workflows/docker_image_build.yml |
57 | | - with: |
58 | | - pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} |
59 | | - VERSION_NUMBER: pre-release-${{ needs.get_commit_id.outputs.sha_short }} |
60 | | - COMMIT_ID: ${{ needs.get_commit_id.outputs.commit_id }} |
61 | | - |
62 | | - release_dev: |
63 | | - needs: [tag_release, package_code, get_commit_id, get_config_values] |
64 | | - uses: ./.github/workflows/docker_image_upload.yml |
65 | | - with: |
66 | | - pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} |
67 | | - AWS_ENVIRONMENT: dev |
68 | | - VERSION_NUMBER: pre-release-${{ needs.get_commit_id.outputs.sha_short }} |
69 | | - COMMIT_ID: ${{ needs.get_commit_id.outputs.commit_id }} |
70 | | - TAG_LATEST: false |
71 | | - DOCKER_IMAGE_TAG: pre-release-${{ needs.get_commit_id.outputs.sha_short }} |
72 | | - secrets: |
73 | | - CDK_PUSH_IMAGE_ROLE: ${{ secrets.DEV_CDK_PUSH_IMAGE_ROLE }} |
74 | | - |
75 | | - release_qa: |
76 | | - needs: |
77 | | - [tag_release, release_dev, package_code, get_commit_id, get_config_values] |
78 | | - uses: ./.github/workflows/docker_image_upload.yml |
79 | | - with: |
80 | | - pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} |
81 | | - AWS_ENVIRONMENT: qa |
82 | | - VERSION_NUMBER: pre-release-${{ needs.get_commit_id.outputs.sha_short }} |
83 | | - COMMIT_ID: ${{ needs.get_commit_id.outputs.commit_id }} |
84 | | - TAG_LATEST: false |
85 | | - DOCKER_IMAGE_TAG: pre-release-${{ needs.get_commit_id.outputs.sha_short }} |
86 | | - secrets: |
87 | | - CDK_PUSH_IMAGE_ROLE: ${{ secrets.QA_CDK_PUSH_IMAGE_ROLE }} |
88 | | - |
89 | | - release_ref: |
90 | | - needs: |
91 | | - [tag_release, release_dev, package_code, get_commit_id, get_config_values] |
92 | | - uses: ./.github/workflows/docker_image_upload.yml |
93 | | - with: |
94 | | - pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} |
95 | | - AWS_ENVIRONMENT: ref |
96 | | - VERSION_NUMBER: pre-release-${{ needs.get_commit_id.outputs.sha_short }} |
97 | | - COMMIT_ID: ${{ needs.get_commit_id.outputs.commit_id }} |
98 | | - TAG_LATEST: false |
99 | | - DOCKER_IMAGE_TAG: pre-release-${{ needs.get_commit_id.outputs.sha_short }} |
100 | | - secrets: |
101 | | - CDK_PUSH_IMAGE_ROLE: ${{ secrets.REF_CDK_PUSH_IMAGE_ROLE }} |
102 | | - |
103 | 35 | package_npm_code: |
104 | | - needs: [quality_checks, get_commit_id, get_config_values] |
| 36 | + needs: [quality_checks, get_config_values] |
105 | 37 | uses: ./.github/workflows/package_npm_code.yml |
106 | 38 | with: |
107 | 39 | pinned_image: ${{ needs.get_config_values.outputs.pinned_image }} |
0 commit comments