@@ -44,37 +44,49 @@ jobs:
44
44
fetch-depth : 0
45
45
46
46
- name : Configure git identity
47
+ env :
48
+ ACTOR : ${{ github.actor }}
47
49
run : |
48
- git config --global user.name ${{ github.actor }}
49
- git config --global user.email ${{ github.actor }} @users.noreply.github.com
50
+ git config --global user.name "$ACTOR"
51
+ git config --global user.email "$ACTOR" @users.noreply.github.com
50
52
51
53
- name : create a new branch that references commit id
54
+ env :
55
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
56
+ COMMIT_ID : ${{ github.event.inputs.commit_id }}
52
57
working-directory : ./local_kernel
53
58
run : |
54
- git checkout -b ${{ github.event.inputs.version_number }} ${{ github.event.inputs.commit_id }}
59
+ git checkout -b "$VERSION_NUMBER" "$COMMIT_ID"
55
60
echo "COMMIT_SHA_1=$(git rev-parse HEAD)" >> $GITHUB_ENV
56
61
57
62
- name : Update source files with version info
63
+ env :
64
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
65
+ MAIN_BR_VERSION_NUMBER : ${{ github.event.inputs.main_br_version }}
66
+ COMMIT_SHA_1 : ${{ env.COMMIT_SHA_1 }}
67
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
58
68
run : |
59
69
# Install deps and run
60
70
pip install -r ./tools/.github/scripts/release-requirements.txt
61
- ./tools/.github/scripts/update_src_version.py FreeRTOS --kernel-repo-path=local_kernel --kernel-commit=${{ env. COMMIT_SHA_1 }} --new-kernel-version=${{ github.event.inputs.version_number }} --new-kernel-main-br-version=${{ github.event.inputs.main_br_version }}
71
+ ./tools/.github/scripts/update_src_version.py FreeRTOS --kernel-repo-path=local_kernel --kernel-commit="$ COMMIT_SHA_1" --new-kernel-version="$VERSION_NUMBER" --new-kernel-main-br-version="$MAIN_BR_VERSION_NUMBER"
62
72
exit $?
63
- env :
64
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
65
73
66
74
- name : Update version number in manifest.yml
75
+ env :
76
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
67
77
working-directory : ./local_kernel
68
78
run : |
69
- ./.github/scripts/manifest_updater.py -v ${{ github.event.inputs.version_number }}
79
+ ./.github/scripts/manifest_updater.py -v "$VERSION_NUMBER"
70
80
exit $?
71
81
72
82
- name : Commit version number change in manifest.yml
83
+ env :
84
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
73
85
working-directory : ./local_kernel
74
86
run : |
75
87
git add .
76
88
git commit -m '[AUTO][RELEASE]: Update version number in manifest.yml'
77
- git push -u origin ${{ github.event.inputs.version_number }}
89
+ git push -u origin "$VERSION_NUMBER"
78
90
79
91
- name : Generate SBOM
80
92
uses : FreeRTOS/CI-CD-Github-Actions/sbom-generator@main
@@ -83,24 +95,32 @@ jobs:
83
95
source_path : ./
84
96
85
97
- name : commit SBOM file
98
+ env :
99
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
86
100
working-directory : ./local_kernel
87
101
run : |
88
102
git add .
89
103
git commit -m '[AUTO][RELEASE]: Update SBOM'
90
- git push -u origin ${{ github.event.inputs.version_number }}
104
+ git push -u origin "$VERSION_NUMBER"
91
105
echo "COMMIT_SHA_2=$(git rev-parse HEAD)" >> $GITHUB_ENV
92
106
93
107
- name : Release
108
+ env :
109
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
110
+ MAIN_BR_VERSION_NUMBER : ${{ github.event.inputs.main_br_version }}
111
+ COMMIT_SHA_2 : ${{ env.COMMIT_SHA_2 }}
112
+ REPO_OWNER : ${{ github.repository_owner }}
113
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
94
114
run : |
95
115
# Install deps and run
96
116
pip install -r ./tools/.github/scripts/release-requirements.txt
97
- ./tools/.github/scripts/release.py ${{ github.repository_owner }} --kernel-repo-path=local_kernel --kernel-commit=${{ env. COMMIT_SHA_2 }} --new-kernel-version=${{ github.event.inputs.version_number }} --new-kernel-main-br-version=${{ github.event.inputs.main_br_version }}
117
+ ./tools/.github/scripts/release.py "$REPO_OWNER" --kernel-repo-path=local_kernel --kernel-commit="$ COMMIT_SHA_2" --new-kernel-version="$VERSION_NUMBER" --new-kernel-main-br-version="$MAIN_BR_VERSION_NUMBER"
98
118
exit $?
99
- env :
100
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
101
119
102
120
- name : Cleanup
121
+ env :
122
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
103
123
working-directory : ./local_kernel
104
124
run : |
105
125
# Delete the branch created for Tag by SBOM generator
106
- git push -u origin --delete ${{ github.event.inputs.version_number }}
126
+ git push -u origin --delete "$VERSION_NUMBER"
0 commit comments