-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.33 KB
/
version-set.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
name: Update version-set
on:
push:
tags:
- "v*.*.*"
jobs:
versionset:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: 'source'
- name: Get values
id: vars
run: |
echo GITHUB_REF_NAME: $GITHUB_REF_NAME
[ -f source/.versionset ] || { echo ".versionset file missing"; exit 1; }
echo "version_set_name=$(cat source/.versionset)" >> $GITHUB_OUTPUT
- name: Update Version-Set
uses: fjogeleit/yaml-update-action@main
with:
valueFile: 'main.yaml'
# propertyPath: '${{ steps.vars.outputs.version_set_name }}.docker_tag'
# value: $GITHUB_REF_NAME
changes: |
{
"${{ steps.vars.outputs.version_set_name }}.docker_tag": "$GITHUB_REF_NAME",
"${{ steps.vars.outputs.version_set_name }}.git_url": "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
}
repository: geokrety/justatest2
branch: deployment/$GITHUB_REPOSITORY/$GITHUB_REF_NAME
targetBranch: main
createPR: true
message: 'Update $GITHUB_REPOSITORY version to $GITHUB_REF_NAME'
token: ${{ secrets.GITHUB_TOKEN }}
workDir: versionset