4 changed files with 12 additions and 160 deletions
@ -1,51 +1,29 @@ |
|||||||
name: Manual review app build and deploy |
name: Manual review app code pipeline |
||||||
|
|
||||||
concurrency: |
concurrency: |
||||||
group: deploy-review${{ inputs.pr_number }} |
group: review-${{ inputs.review_app_key }} |
||||||
|
|
||||||
on: |
on: |
||||||
workflow_dispatch: |
workflow_dispatch: |
||||||
inputs: |
inputs: |
||||||
pr_number: |
review_app_key: |
||||||
required: true |
required: true |
||||||
type: string |
type: string |
||||||
description: "The PR number of the review app to deploy code for. Note: this is NOT the ticket number" |
description: "The review app ID to deploy code for." |
||||||
|
|
||||||
permissions: {} |
|
||||||
|
|
||||||
defaults: |
defaults: |
||||||
run: |
run: |
||||||
shell: bash |
shell: bash |
||||||
|
|
||||||
jobs: |
jobs: |
||||||
get_pr_head_sha: |
|
||||||
name: Get PR HEAD SHA |
|
||||||
runs-on: ubuntu-latest |
|
||||||
outputs: |
|
||||||
pr_head_sha: ${{ steps.get_sha.outputs.pr_head_sha }} |
|
||||||
steps: |
|
||||||
- name: Get PR HEAD SHA |
|
||||||
id: get_sha |
|
||||||
uses: actions/github-script@v7 |
|
||||||
with: |
|
||||||
script: | |
|
||||||
const { data: pr } = await github.rest.pulls.get({ |
|
||||||
owner: context.repo.owner, |
|
||||||
repo: context.repo.repo, |
|
||||||
pull_number: parseInt('${{ inputs.pr_number }}'), |
|
||||||
}); |
|
||||||
core.setOutput('pr_head_sha', pr.head.sha); |
|
||||||
|
|
||||||
code: |
code: |
||||||
name: Deploy review app code |
name: Deploy review app code |
||||||
needs: [get_pr_head_sha] |
|
||||||
uses: ./.github/workflows/aws_deploy.yml |
uses: ./.github/workflows/aws_deploy.yml |
||||||
with: |
with: |
||||||
aws_account_id: 837698168072 |
aws_account_id: 837698168072 |
||||||
aws_role_prefix: core-dev |
aws_role_prefix: core-dev |
||||||
aws_task_prefix: core-review-${{ inputs.pr_number }} |
aws_task_prefix: core-review-${{ inputs.review_app_key }} |
||||||
concurrency_tag: ${{ inputs.pr_number }} |
concurrency_tag: ${{ inputs.review_app_key }} |
||||||
environment: review |
environment: review |
||||||
ref: ${{ needs.get_pr_head_sha.outputs.pr_head_sha }} |
|
||||||
permissions: |
permissions: |
||||||
id-token: write |
id-token: write |
||||||
|
|||||||
Loading…
Reference in new issue