File tree Expand file tree Collapse file tree 5 files changed +54
-5
lines changed Expand file tree Collapse file tree 5 files changed +54
-5
lines changed Original file line number Diff line number Diff line change
1
+ name : ' Switch context'
2
+ inputs :
3
+ context-name :
4
+ description : ' Context name to switch to'
5
+ required : true
6
+ outputs :
7
+ python-version :
8
+ description : ' Python version'
9
+ value : string
10
+ initial-commit-sha :
11
+ description : ' Initial commit sha for calculating changelog diffs'
12
+ value : string
13
+ initial-version :
14
+ description : ' Initial version to release if no tag exists yet'
15
+ value : string
16
+ runs :
17
+ using : " composite"
18
+ steps :
19
+ - name : Switch context
20
+ shell : bash
21
+ run : |
22
+ echo "Initializing context files"
23
+ cp scripts/dev/contexts/gha-private-context scripts/dev/contexts/private-context
24
+ scripts/dev/switch_context.sh ${{inputs.context-name}}
25
+ echo "Finished initializing to the ${{inputs.context-name}}"
26
+ echo "python-version=$(echo $PYTHON_VERSION)" >> $GITHUB_OUTPUT
27
+ echo "initial-commit-sha=$(echo $INITIAL_COMMIT_SHA)" >> $GITHUB_OUTPUT
28
+ echo "initial-version=$(echo $INITIAL_VERSION)" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change @@ -21,18 +21,22 @@ jobs:
21
21
uses : actions/checkout@v4
22
22
with :
23
23
fetch-depth : ' 0'
24
+ - name : Switch to root context
25
+ id : switch_context
26
+ uses : ./.github/actions/switch-context
27
+ with :
28
+ context-name : ' root-context'
24
29
- name : Setup host
25
30
uses : ./.github/actions/setup-ubuntu-host
26
31
with :
27
- python-version : ' ${{ vars.PYTHON_VERSION }}'
32
+ python-version : ' ${{ steps.switch_context.outputs.python-version }}'
28
33
- name : Generate Release Notes
29
- id : generate_release_notes
30
34
run : python -m scripts.release.release_notes -s $INITIAL_COMMIT_SHA -v $INITIAL_VERSION -o release_notes_tmp.md
31
35
env :
32
36
# We can not use environments set via GitHub UI because they will
33
37
# not be available in the pull requests running from forks.
34
- INITIAL_COMMIT_SHA : 9ed5f98fc70c5b3442f633d2393265fb8a2aba0c
35
- INITIAL_VERSION : 1.3.0
38
+ INITIAL_COMMIT_SHA : ' ${{ steps.switch_context.outputs.initial-commit-sha }} '
39
+ INITIAL_VERSION : ' ${{ steps.switch_context.outputs.initial-version}} '
36
40
- name : Add disclaimer to release notes preview
37
41
run : |
38
42
echo -e "_:warning: (this preview might not be accurate if the PR is not rebased on current master branch)_\n" > release_notes_preview.md
Original file line number Diff line number Diff line change @@ -22,10 +22,15 @@ jobs:
22
22
uses : actions/checkout@v4
23
23
with :
24
24
fetch-depth : ' 0'
25
+ - name : Switch to root context
26
+ id : switch_context
27
+ uses : ./.github/actions/switch-context
28
+ with :
29
+ context-name : ' root-context'
25
30
- name : Setup host
26
31
uses : ./.github/actions/setup-ubuntu-host
27
32
with :
28
- python-version : ' ${{ vars.PYTHON_VERSION }}'
33
+ python-version : ' ${{ steps.switch_context.outputs.python-version }}'
29
34
- name : Check if changelog entry file was added in this PR
30
35
run : |
31
36
set -o pipefail
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -Eeou pipefail
4
+
5
+ export NAMESPACE=" "
6
+ export CLUSTER_NAME=" "
7
+ export LOCAL_OPERATOR=" false"
8
+ export BASE_REPO_URL=" "
Original file line number Diff line number Diff line change 129
129
# but we can unify once we are done with unified operator
130
130
# installation for both multicluster and single cluster setups.
131
131
export OPERATOR_NAME=" mongodb-kubernetes-operator"
132
+
133
+ # Variables used for release process
134
+ export INITIAL_COMMIT_SHA=" 9ed5f98fc70c5b3442f633d2393265fb8a2aba0c"
135
+ export INITIAL_VERSION=" 1.3.0"
You can’t perform that action at this time.
0 commit comments