-
Notifications
You must be signed in to change notification settings - Fork 35
44 lines (41 loc) · 1.23 KB
/
build-api-lambda.yml
File metadata and controls
44 lines (41 loc) · 1.23 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
---
# This workflow is used to build the API lambda
# lambda function bootstrap binary that can be deployed to AWS Lambda.
name: Build API Lambda
on:
workflow_dispatch:
workflow_call:
inputs:
ref:
required: false
type: string
default: ${{ github.ref }}
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
env:
BINARY_PATH: .artifacts/Elastic.Documentation.Api.Lambda/release_linux-x64/bootstrap
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.ref }}
- name: Amazon Linux 2023 build
run: |
docker build . -t api-lambda:latest -f src/api/Elastic.Documentation.Api.Lambda/Dockerfile
- name: Get bootstrap binary
run: |
docker cp $(docker create --name tc api-lambda:latest):/app/.artifacts/publish ./.artifacts && docker rm tc
- name: Inspect bootstrap binary
run: |
tree .artifacts
stat "${BINARY_PATH}"
- name: Archive artifact
id: upload-artifact
uses: actions/upload-artifact@v7
with:
name: api-lambda-binary
retention-days: 1
if-no-files-found: error
path: ${{ env.BINARY_PATH }}