-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.77 KB
/
generate-ssm-agent-blueprint.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
54
55
56
57
58
59
60
name: Generate blueprints for SSM Agent
on:
repository_dispatch:
types: [trigger-ssm-agent-workflow]
workflow_dispatch:
jobs:
generate-blueprint:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Checkout terraform-aws-ssm-agent
uses: actions/checkout@v4
with:
repository: dfds/terraform-aws-ssm-agent
path: ./aws-ssm-agent/aws-modules-ssm-agent
ref: ${{ github.event.client_payload.release_tag }}
token: ${{ secrets.AUTH_TOKEN }}
- name: Build docker image
working-directory: ./tools
run: |
docker build -t scaffold:latest .
shell: bash
- name: Run script
run: |
input=$(pwd)/aws-ssm-agent/aws-modules-ssm-agent/
output=$(pwd)/aws-ssm-agent/generic/
if [ -d $output ]; then
rm -rf $output
fi
mkdir -p $output
docker run -e RELEASE=${{ github.event.client_payload.release_tag }} -v $input:/input -v $output:/output scaffold:latest
sudo chown -R $USER:$USER $output
shell: bash
- name: setup git config
run: |
# setup the username and email.
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Create a pull request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Github Actions update blueprints for SSM Agent module"
title: "Github Actions update blueprints for SSM Agent module"
body: |
Updates generated by the GitHub Actions workflow.
branch: blueprint-updates
base: main
labels: blueprints