-
Notifications
You must be signed in to change notification settings - Fork 20
44 lines (38 loc) · 1.36 KB
/
ami.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
name: Build AMI
# on:
# push:
# tags:
# - 'v*.*.*' # Enforce Semantic Versioning
on:
workflow_dispatch:
inputs:
version:
description: "Version of LRSQL to build"
required: true
jobs:
upload_dbfn:
runs-on: ubuntu-latest
# These permissions are needed by configure-aws-credentials in order
# to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write # required to use OIDC authentication
contents: read # required to checkout the code from the repo
steps:
- name: Install JQ
run: sudo apt update && sudo apt install -y jq
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ami-build
# - name: Extract version
# id: version
# run: echo version="v0.7.11" >> $GITHUB_OUTPUT
# run: echo version=${GITHUB_REF#refs\/tags\/} >> $GITHUB_OUTPUT
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: arn:aws:iam::376099832799:role/lrsql-imagebuilder-ghacti-BuildAMIGithubActionsRole-IHZUC98qYzfG
role-duration-seconds: 900 # 15 min; minimal duration possible
aws-region: us-east-1
- name: Trigger AMI Build
run: ./dev-resources/template/marketplace/trigger-update.sh -v ${{ github.event.inputs.version }}