-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (42 loc) · 1.43 KB
/
update-patch-version.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
name: Update Patch Version
on:
repository_dispatch:
types:
- UpdateVersionInPatchFile
jobs:
update_patch_version:
name: Update Patch Version
runs-on: ubuntu-latest
env:
LTS_VERSION: ${{ github.event.client_payload.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.branch }}
- name: Create yq Query
id: create_yq_query
run: |
echo "Updating spinnaker version to ${LTS_VERSION}"
SERVICE_QUERY="(.spec.spinnakerConfig.config.version)"
echo ::set-output name=query::"$SERVICE_QUERY = \"${LTS_VERSION}\""
- name: Update Stack File
uses: mikefarah/[email protected]
with:
cmd: yq eval -i '${{ steps.create_yq_query.outputs.query }}' resources/patch-spinnaker-version.yml
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
token: ${{ secrets.ASTROLABE_GITHUB_TOKEN }}
commit-message: "chore(cd): update Spinnaker version to ${{ env.LTS_VERSION}}"
branch: ${{ env.LTS_VERSION}}
branch-suffix: timestamp
title: "chore(cd): update Spinnaker version to ${{ env.LTS_VERSION}}"
labels: |
autoMerge
ltsUpdate
body: |
Event
```
${{ toJson(github.event.client_payload) }}
```