refactor: FTRS-313 Refactor GitHub workflows to enhance SonarQube sec… #1
Workflow file for this run
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: Promote artefacts workflow | ||
| run-name: "Promote ${{ inputs.artefact_promotion_type }} artefacts ${{ inputs.release_tag || inputs.prerelease_tag }}" | ||
| permissions: {} | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| environment: | ||
| description: "The deployment environment" | ||
| required: false | ||
| type: string | ||
| default: "mgmt" | ||
| repo_name: | ||
| description: "The name of the Git repo" | ||
| required: true | ||
| type: string | ||
| artefact_promotion_type: | ||
| description: "The type of artefact promotion to perform" | ||
| required: true | ||
| type: string | ||
| type: | ||
| description: "The type of permissions (e.g., account, app)" | ||
| required: true | ||
| type: string | ||
| release_tag: | ||
| description: "The release tag for the artefact" | ||
| required: false | ||
| type: string | ||
| prerelease_tag: | ||
| description: "The prerelease tag for the artefact" | ||
| required: false | ||
| type: string | ||
| ref: | ||
| description: "The branch, tag or SHA to checkout" | ||
| required: false | ||
| type: string | ||
| secrets: | ||
| ACCOUNT_ID: | ||
| description: "AWS account ID for credentials" | ||
| required: true | ||
| GITHUB_TOKEN: | ||
|
Check failure on line 41 in .github/workflows/promote-artefacts.yaml
|
||
| description: "GitHub token for release creation" | ||
| required: false | ||
| jobs: | ||
| promote-artefacts: | ||
| name: "Promote ${{ inputs.artefact_promotion_type }} artefacts ${{ inputs.release_tag || inputs.prerelease_tag }}" | ||
| permissions: | ||
| id-token: write | ||
| contents: write | ||
| runs-on: ubuntu-latest | ||
| environment: ${{ inputs.environment }} | ||
| steps: | ||
| - name: "Checkout code" | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ inputs.ref || inputs.prerelease_tag || inputs.release_tag }} | ||
| - name: "Configure AWS Credentials" | ||
| uses: ./.github/actions/configure-credentials | ||
| with: | ||
| aws_account_id: ${{ secrets.ACCOUNT_ID }} | ||
| aws_region: ${{ vars.AWS_REGION }} | ||
| type: ${{ inputs.type }} | ||
| environment: ${{ inputs.environment }} | ||
| - name: "Create GitHub Release" | ||
| id: semantic | ||
| if: ${{ inputs.artefact_promotion_type == 'release' }} | ||
| uses: cycjimmy/semantic-release-action@b12c8f6015dc215fe37bc154d4ad456dd3833c90 # v6.0.0 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: "Promote ${{ inputs.artefact_promotion_type }} artefacts ${{ steps.semantic.outputs.new_release_version || inputs.release_tag || inputs.prerelease_tag }}" | ||
| run: make -f artefact-promotion.mk ${{ inputs.artefact_promotion_type }} | ||
| working-directory: scripts/services | ||
| env: | ||
| ENVIRONMENT: ${{ inputs.environment }} | ||
| REPO_NAME: ${{ inputs.repo_name }} | ||
| RELEASE_TAG: ${{ steps.semantic.outputs.new_release_version || inputs.release_tag }} | ||
| PRERELEASE_TAG: ${{ inputs.prerelease_tag }} | ||