@@ -169,104 +169,3 @@ jobs:
169169 if : github.base_ref == 'master'
170170 with :
171171 labels : ignoreChangelog
172-
173- create-release :
174- if : github.event.pull_request.merged && github.base_ref == 'master'
175- runs-on : ubuntu-latest
176- steps :
177- - name : Check for patch label
178- if : contains(github.event.pull_request.labels.*.name, 'patch') || contains(github.event.pull_request.labels.*.name, 'dependency') || contains(github.event.pull_request.labels.*.name, 'documentation')
179- id : patch
180- run : |
181- echo "set=true" >> $GITHUB_OUTPUT
182- - name : Check for minor label
183- if : contains(github.event.pull_request.labels.*.name, 'minor')
184- id : minor
185- run : |
186- echo "set=true" >> $GITHUB_OUTPUT
187- - name : Check for major label
188- if : contains(github.event.pull_request.labels.*.name, 'major')
189- id : major
190- run : |
191- echo "set=true" >> $GITHUB_OUTPUT
192-
193- - uses : actions/checkout@v4
194- with :
195- # Make sure we use the right commit to tag
196- ref : ${{ github.event.pull_request.merge_commit_sha }}
197- # We also need to use the personal access token here. As subsequent
198- # actions will not trigger by tags/pushes that use `GITHUB_TOKEN`
199- # https://github.com/orgs/community/discussions/25702#discussioncomment-3248819
200- token : ${{ secrets.COMPONENT_ACCESS_TOKEN }}
201- # This is broken in checkout@v4...
202- # https://github.com/actions/checkout/issues/1781
203- fetch-tags : true
204-
205- - name : fetch tags
206- run : |
207- git fetch --tags
208- echo "latest tag: $(git describe --tags "$(git rev-list --tags --max-count=1)")"
209- echo "TAG_VERSION=$(git describe --tags "$(git rev-list --tags --max-count=1)")" >> $GITHUB_ENV
210-
211- - name : Extract branch name
212- shell : bash
213- run : echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
214- id : extract_branch
215-
216- # We only run this if any of the release tags is set.
217- # For docs and deps we don't do automagic releases
218- - name : Increase Tag
219- id : tag
220- run : |
221- patch=${{ steps.patch.outputs.set }}
222- minor=${{ steps.minor.outputs.set }}
223- major=${{ steps.major.outputs.set }}
224-
225- major_ver=$(echo '${{ env.TAG_VERSION }}' | cut -d "." -f1)
226- minor_ver=$(echo '${{ env.TAG_VERSION }}' | cut -d "." -f2)
227- patch_ver=$(echo '${{ env.TAG_VERSION }}' | cut -d "." -f3)
228-
229- major_ver="${major_ver:1}"
230-
231- # Check for patch label
232- [ ! -z "$patch" ] && [ -z "$minor" ] && [ -z "$major" ] && ((patch_ver++)) || true
233-
234- # check for minor label
235- if [ ! -z "$minor" ] && [ -z "$major" ]; then
236- ((minor_ver++))
237- patch_ver=0
238- fi
239-
240- # Check for major label
241- if [ ! -z "$major" ]; then
242- ((major_ver++))
243- minor_ver=0
244- patch_ver=0
245- fi
246-
247- tag="v$major_ver.$minor_ver.$patch_ver"
248- echo "new tag $tag"
249- git tag $tag
250- git push --tags
251- echo tag=$tag >> $GITHUB_OUTPUT
252-
253- - name : Checkout component
254- uses : actions/checkout@v4
255- with :
256- repository : ${{ env.COMPONENT_REPO }}
257- token : ${{ secrets.COMPONENT_ACCESS_TOKEN }}
258- ref : " ${{ env.APP_NAME }}/${{ github.event.pull_request.number }}/${{ steps.extract_branch.outputs.branch }}"
259- fetch-depth : 0
260-
261- - name : Update tag and run golden
262- run : |
263- yq e '.parameters.appcat.images.${{ env.APP_NAME }}.tag="${{ steps.tag.outputs.tag }}"' class/defaults.yml | diff -B class/defaults.yml - | patch class/defaults.yml - || true
264- make gen-golden-all
265-
266- - name : Commit & Push changes
267- uses : actions-js/push@master
268- with :
269- github_token : ${{ secrets.COMPONENT_ACCESS_TOKEN }}
270- branch : " ${{ env.APP_NAME }}/${{ github.event.pull_request.number }}/${{ steps.extract_branch.outputs.branch }}"
271- message : " Update tag"
272- repository : ${{ env.COMPONENT_REPO }}
0 commit comments