|
| 1 | +name: "Create confluence release notes" |
| 2 | +description: "Do release note actions in confluence and jira" |
| 3 | +inputs: |
| 4 | + TARGET_ENVIRONMENT: |
| 5 | + required: true |
| 6 | + description: "Target Environment" |
| 7 | + RELEASE_TAG: |
| 8 | + required: false |
| 9 | + description: "The tag we are releasing - only used for create_rc_release_notes" |
| 10 | + CONFLUENCE_PAGE_ID: |
| 11 | + required: true |
| 12 | + description: "The id of confluence page to update or create under" |
| 13 | + CREATE_RC_RELEASE_NOTES: |
| 14 | + required: true |
| 15 | + description: "whether to create rc release notes page instead of normal release notes" |
| 16 | + default: "false" |
| 17 | + DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE: |
| 18 | + required: true |
| 19 | + description: "The role to assume to execute the release notes lambda" |
| 20 | + DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE: |
| 21 | + required: true |
| 22 | + description: "The dev cloud formation deploy role" |
| 23 | + TARGET_CLOUD_FORMATION_CHECK_VERSION_ROLE: |
| 24 | + required: true |
| 25 | + description: "The target cloud formation deploy role" |
| 26 | + |
| 27 | +runs: |
| 28 | + using: "composite" |
| 29 | + steps: |
| 30 | + - name: connect to target account |
| 31 | + uses: aws-actions/configure-aws-credentials@v4 |
| 32 | + with: |
| 33 | + aws-region: eu-west-2 |
| 34 | + role-to-assume: ${{ inputs.TARGET_CLOUD_FORMATION_CHECK_VERSION_ROLE }} |
| 35 | + role-session-name: vpc-resources-release-notes-target |
| 36 | + |
| 37 | + - name: Get deployed tag on target |
| 38 | + shell: bash |
| 39 | + working-directory: .github/scripts |
| 40 | + env: |
| 41 | + TARGET_ENVIRONMENT: ${{ inputs.TARGET_ENVIRONMENT }} |
| 42 | + run: ./get_target_deployed_tag.sh |
| 43 | + |
| 44 | + - name: connect to dev account |
| 45 | + uses: aws-actions/configure-aws-credentials@v4 |
| 46 | + with: |
| 47 | + aws-region: eu-west-2 |
| 48 | + role-to-assume: ${{ inputs.DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE }} |
| 49 | + role-session-name: vpc-resources-release-notes-dev |
| 50 | + |
| 51 | + - name: get current dev tag |
| 52 | + shell: bash |
| 53 | + working-directory: .github/scripts |
| 54 | + run: ./get_current_dev_tag.sh |
| 55 | + |
| 56 | + - name: connect to dev account to run release notes lambda |
| 57 | + uses: aws-actions/configure-aws-credentials@v4 |
| 58 | + with: |
| 59 | + aws-region: eu-west-2 |
| 60 | + role-to-assume: ${{ inputs.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }} |
| 61 | + role-session-name: vpc-resources-release-notes-run-lambda |
| 62 | + unset-current-credentials: true |
| 63 | + |
| 64 | + - name: create int release notes |
| 65 | + shell: bash |
| 66 | + working-directory: .github/scripts |
| 67 | + if: inputs.TARGET_ENVIRONMENT == 'int' && inputs.CREATE_RC_RELEASE_NOTES == 'false' |
| 68 | + env: |
| 69 | + ENV: INT |
| 70 | + PAGE_ID: ${{ inputs.CONFLUENCE_PAGE_ID }} |
| 71 | + run: ./create_env_release_notes.sh |
| 72 | + |
| 73 | + - name: create int rc release notes |
| 74 | + shell: bash |
| 75 | + working-directory: .github/scripts |
| 76 | + if: inputs.TARGET_ENVIRONMENT == 'int' && inputs.CREATE_RC_RELEASE_NOTES == 'true' |
| 77 | + env: |
| 78 | + RELEASE_TAG: ${{ inputs.RELEASE_TAG }} |
| 79 | + PAGE_ID: ${{ inputs.CONFLUENCE_PAGE_ID }} |
| 80 | + run: ./create_int_rc_release_notes.sh |
| 81 | + |
| 82 | + - name: create prod release notes |
| 83 | + shell: bash |
| 84 | + working-directory: .github/scripts |
| 85 | + if: inputs.TARGET_ENVIRONMENT == 'prod' |
| 86 | + env: |
| 87 | + ENV: PROD |
| 88 | + PAGE_ID: ${{ inputs.CONFLUENCE_PAGE_ID }} |
| 89 | + run: ./create_env_release_notes.sh |
0 commit comments