-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (36 loc) · 1.47 KB
/
ci.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
on:
workflow_dispatch:
workflow_call:
outputs:
image-tag:
description: "image tag"
value: ${{ jobs.build-and-test.outputs.image-tag }}
name: ci
jobs:
build-and-test:
runs-on: ubuntu-latest
outputs:
image-tag: ${{ steps.set-image-tag.outputs.IMAGE_TAG }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Echo
run: echo "CI..."
- name: Set image tag output
id: set-image-tag
run: |
echo "IMAGE_TAG=1.0.0" >> $GITHUB_OUTPUT
# TODO:
# Configure dynamic credentials to AWS, check out the action: aws-actions/configure-aws-credentials
# Lint the CloudFormation template (templates/), check out the action: scottbrenner/cfn-lint-action
# Perform static analysis against the CloudFormation template, check out the action: stelligent/cfn_nag@master
# Checkout Amplify Repo (we do this so that you can start to build the Amplify app from this repo)
- name: Checkout Amplify Repo
run: |
cd $GITHUB_WORKSPACE
git clone https://github.com/ProgramEquity/amplify app
cp $GITHUB_WORKSPACE/Dockerfile $GITHUB_WORKSPACE/app
ls -l $GITHUB_WORKSPACE/app
# Build the Amplify app and create a docker image, relevant actions: aws-actions/amazon-ecr-login@v1
# Scan the docker image in ECR, check out the action: alexjurkiewicz/ecr-scan-image for inspiration
# Create build summary output