-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (50 loc) · 2.08 KB
/
ci.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
name: CI
on: [push]
env:
YQ_VERSION: "4.25.1"
jobs:
python:
runs-on: ubuntu-latest
outputs:
forwarder: ${{ steps.forwarder-package.outputs.artifact-url }}
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
- uses: chartboost/ruff-action@v1
with:
args: "format --check"
- uses: actions/upload-artifact@v4
id: forwarder-package
with:
name: forwarder.zip
path: src/*
retention-days: 1
cloudformation:
runs-on: ubuntu-latest
needs:
- python
steps:
- uses: actions/checkout@v4
- run: wget https://github.com/mikefarah/yq/releases/download/v$YQ_VERSION/yq_linux_amd64.tar.gz -O - | tar xz && mv yq_linux_amd64 /usr/local/bin/yq
- run: echo "${{ needs.python.outputs.forwarder }}"
- run: |-
mkdir build
yq ".Resources.ForwarderLambda.Properties.Code.ZipFile = \"${{ needs.python.outputs.forwarder }}" cloudformation-stacks/forwarder.template.yaml > build/axiom-cloudwatch-forwarder-cloudformation-stack.yaml
yq ".Resources.SubscriberLambda.Properties.Code.ZipFile = \"${{ needs.python.outputs.forwarder }}" cloudformation-stacks/subscriber.template.yaml > build/axiom-cloudwatch-subscriber-cloudformation-stack.yaml
yq ".Resources.UnsubscriberLambda.Properties.Code.ZipFile = \"${{ needs.python.outputs.forwarder }}" cloudformation-stacks/unsubscriber.template.yaml > build/axiom-cloudwatch-unsubscriber-cloudformation-stack.yaml
yq ".Resources.ListenerLambda.Properties.Code.ZipFile = \"${{ needs.python.outputs.forwarder }}" cloudformation-stacks/listener.template.yaml > build/axiom-cloudwatch-listener-cloudformation-stack.yaml
- run: cat build/*
- uses: actions/upload-artifact@v4
with:
name: stacks
path: build/*
retention-days: 1
terraform:
name: "terraform fmt"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Terraform Format
id: fmt
run: terraform fmt -recursive -check