This repository has been archived by the owner on Oct 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
55 lines (55 loc) · 1.87 KB
/
action.yml
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
name: Asset Build & Push
description: Github Action to automates supported asset types build & push processes on Nullplatform
inputs:
application-id:
description: The application id where this asset belongs to
required: true
build-id:
description: The build id where this asset belongs to
required: true
type:
description: The asset type, could be docker-image, lambda, etc
required: true
path:
description: The path inside the repository where the asset should be created. Defaults to current path
required: false
default: .
name:
description: The asset name, by default 'main'
required: false
default: main
metadata:
description: "The asset metadata, format is: <key>:<value>"
required: false
runs:
using: composite
steps:
- name: Checkout code
id: checkout-code
uses: actions/checkout@v3
- name: Get build parameters
id: get-build-parameters
uses: nullplatform/github-action-parameter@v1
with:
application-id: ${{ inputs.application-id }}
- name: Configure AWS credentials
id: configure-aws-credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ env.BUILD_AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ env.BUILD_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.BUILD_AWS_REGION }}
- name: Build & push Docker image
uses: nullplatform/github-action-asset-build-push/docker-image@v1
if: ${{ inputs.type == 'docker-image' }}
with:
build-id: ${{ inputs.build-id }}
path: ${{ inputs.path }}
name: ${{ inputs.name }}
- name: Build & push Lambda function
uses: nullplatform/github-action-asset-build-push/lambda@v1
if: ${{ inputs.type == 'lambda' }}
with:
build-id: ${{ inputs.build-id }}
path: ${{ inputs.path }}
name: ${{ inputs.name }}