-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (70 loc) · 1.98 KB
/
sam_release_code.yml
File metadata and controls
77 lines (70 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: sam release code
on:
workflow_call:
inputs:
STACK_NAME:
required: true
type: string
ARTIFACT_BUCKET_PREFIX:
required: true
type: string
TARGET_ENVIRONMENT:
required: true
type: string
BUILD_ARTIFACT:
required: true
type: string
VERSION_NUMBER:
required: true
type: string
COMMIT_ID:
required: true
type: string
LOG_LEVEL:
required: true
type: string
LOG_RETENTION_DAYS:
required: true
type: string
secrets:
CLOUD_FORMATION_DEPLOY_ROLE:
required: true
jobs:
sam_release_code:
runs-on: ubuntu-latest
environment: ${{ inputs.TARGET_ENVIRONMENT }}
permissions:
id-token: write
contents: write
steps:
- name: Checkout local github actions
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH_NAME }}
fetch-depth: 0
sparse-checkout: |
.github
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
role-to-assume: ${{ secrets.CLOUD_FORMATION_DEPLOY_ROLE }}
role-session-name: github-actions
- name: download build artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.BUILD_ARTIFACT }}
path: .
- name: release code
shell: bash
working-directory: .github/scripts
env:
artifact_bucket_prefix: dummy_spine/${{ inputs.ARTIFACT_BUCKET_PREFIX }}
COMMIT_ID: ${{ inputs.COMMIT_ID }}
LOG_LEVEL: ${{ inputs.LOG_LEVEL }}
LOG_RETENTION_DAYS: ${{ inputs.LOG_RETENTION_DAYS }}
stack_name: ${{ inputs.STACK_NAME }}
TARGET_ENVIRONMENT: ${{ inputs.TARGET_ENVIRONMENT }}
template_file: template.yaml
VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }}
run: ./release_code.sh