-
Notifications
You must be signed in to change notification settings - Fork 27
83 lines (71 loc) · 2.4 KB
/
Copy pathcreate-release.yaml
File metadata and controls
83 lines (71 loc) · 2.4 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: create release
on:
workflow_dispatch:
inputs:
name:
description: 'Release name ( e.g. "2.1.3" )'
default: ""
required: true
latest_release:
description: "Latest release"
type: boolean
default: false
jobs:
upgrade-images:
name: Upgrade main images
runs-on: ubuntu-latest
environment: secrets
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
token: ${{ secrets.BOT_TOKEN }}
fetch-depth: 0
- name: Bump values.yaml
run: |
./hack/replace_serverless_chart_images.sh all .
env:
IMG_DIRECTORY: "prod"
IMG_VERSION: ${{ github.event.inputs.name }}
PROJECT_ROOT: "."
- name: Bump operator kustomize
run: ./.github/scripts/upgrade-operator-kustomize.sh
env:
IMG: "europe-docker.pkg.dev/kyma-project/prod/serverless-operator:${{ github.event.inputs.name }}"
MODULE_VERSION: ${{ github.event.inputs.name }}
- name: Bump component-config.yaml based on values.yaml
run: ./.github/scripts/upgrade-component-config.sh
env:
IMG_VERSION: ${{ github.event.inputs.name }}
- name: Commit&Push
run: |
git config --local user.email "team-otters@sap.com"
git config --local user.name "ottersbot"
git add .
git commit --allow-empty -m "upgrade dependencies"
git push origin ${{ github.ref_name }}
create-tag:
name: Create tag
needs: upgrade-images
runs-on: ubuntu-latest
environment: secrets
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
token: ${{ secrets.BOT_TOKEN }}
fetch-depth: 0
ref: ${{ github.ref_name }} # Checkout to latest branch changes
- name: Tag latest
if: ${{ github.event.inputs.latest_release }}
# tag commit to inform another workload, responsible for creating right release
# that this release should be the latest one
run: |
git tag --force latest
git push --force origin latest
- name: Create tag
run: |
git tag ${{ github.event.inputs.name }}
git push origin ${{ github.event.inputs.name }}
# this workload ends on creating the right tag
# the next steps are located in the .github/workloads/create-release-on-tag.yaml file