-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
77 lines (71 loc) · 2.44 KB
/
action.yaml
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: 'store-artifacts'
description: 'Store workspace artifacts'
inputs:
use_aws_sam:
description: If AWS SAM is used by the project; if true, the `sam package` command will run to store template and function artifacts in S3
required: false
aws_account_region:
description: AWS region to deploy to
required: false
default: us-east-1
artifact_name_override:
description: Override name of artifact
required: false
artifact_retention_days:
description: Number of days to retain artifacts
required: false
default: "14"
packaged_template_file:
description: Path to packaged SAM template file
required: false
default: packaged-template.yaml
sam_s3_bucket:
description: S3 bucket for SAM deployment
required: false
default: aws-sam-cli-sourcebucket-225989329251-us-east-1
sam_s3_prefix:
description: S3 prefix for SAM deployment
required: false
runs:
using: composite
steps:
- name: Set artifact name
id: set-artifact-name
uses: ServerlessOpsIO/gha-artifact-name@v1
with:
artifact_name_override: ${{ inputs.artifact_name_override }}
- name: Package & Upload SAM artifact
id: package-sam
if: ${{ inputs.use_aws_sam }}
uses: ServerlessOpsIO/gha-package-aws-sam@v1
with:
aws_account_region: ${{ inputs.aws_account_region }}
packaged_template_file: packaged-template.yaml
sam_s3_bucket: ${{ inputs.sam_s3_bucket }}
sam_s3_prefix: ${{ inputs.sam_s3_prefix }}
- name: 'Upload pipeline artifact'
id: upload-artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.set-artifact-name.outputs.artifact-name }}
path: |
**/*
!.aws-sam/build
!**/.terraform/providers
!node_modules
!.git
if-no-files-found: error
retention-days: ${{ inputs.artifact_retention_days }}
outputs:
artifact-name:
description: Name of artifact stored
value: ${{ steps.set-artifact-name.outputs.artifact-name }}
packaged-template:
description: Path to packaged SAM template file
value: ${{ steps.package-sam.outputs.packaged-template }}
sam-artifact-bucket:
description: S3 bucket where SAM artifact was uploaded
value: ${{ steps.set-sam-s3-bucket.outputs.s3-bucket }}
sam-artifact-bucket-prefix:
description: S3 prefix where SAM artifact was uploaded
value: ${{ steps.set-sam-s3-prefix.outputs.s3-prefix }}