-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.26 KB
/
generate-pipelines.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
name: Generate GoCD Pipelines
on:
push:
paths:
- "pipelines/**/values.yaml"
- "templates/gocd/templates/deploy.yaml"
repository_dispatch:
types: [generate-pipelines]
jobs:
generate-pipelines:
runs-on: ubuntu-latest
concurrency:
group: app-pipeline-group-${{ github.event.client_payload.appName }}
cancel-in-progress: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Generate GoCD pipeline files
run: |
BASE_PATH="pipelines"
CHART_PATH="templates/gocd"
for SERVICE in $(ls "$BASE_PATH"); do
VALUES_FILE="./$BASE_PATH/$SERVICE/values.yaml"
OUTPUT_FILE="./$BASE_PATH/$SERVICE/$SERVICE-pipeline.gocd.yaml"
helm template $SERVICE $CHART_PATH -f $VALUES_FILE | tee $OUTPUT_FILE
done
- name: Commit and push changes
run: |
git config user.name "in-jun"
git config user.email "[email protected]"
git add .
git commit -m "Update GoCD pipeline files"
git push