ci: Auto-update Elastic version on tls branch
This commit is contained in:
parent
94d6273524
commit
f808ff31cf
|
@ -7,13 +7,14 @@ on:
|
||||||
- completed
|
- completed
|
||||||
branches:
|
branches:
|
||||||
- update/main
|
- update/main
|
||||||
|
- update/tls
|
||||||
- update/release-7.x
|
- update/release-7.x
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
merge:
|
merge:
|
||||||
name: Merge pull request
|
name: Merge pull request
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
if: github.event.workflow_run.conclusion == 'success'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -11,12 +11,11 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
release:
|
|
||||||
- 8.x
|
|
||||||
- 7.x
|
|
||||||
include:
|
include:
|
||||||
- release: 8.x
|
- release: 8.x
|
||||||
branch: main
|
branch: main
|
||||||
|
- release: 8.x
|
||||||
|
branch: tls
|
||||||
- release: 7.x
|
- release: 7.x
|
||||||
branch: release-7.x
|
branch: release-7.x
|
||||||
|
|
||||||
|
@ -68,12 +67,15 @@ jobs:
|
||||||
cur_ver="$ELASTIC_VERSION"
|
cur_ver="$ELASTIC_VERSION"
|
||||||
new_ver=${{ fromJson(steps.get-latest-release.outputs.result).version }}
|
new_ver=${{ fromJson(steps.get-latest-release.outputs.result).version }}
|
||||||
|
|
||||||
# Escape dot characters so sed interprets them as literal dots
|
# Escape period characters so sed interprets them literally
|
||||||
cur_ver="$(echo $cur_ver | sed 's/\./\\./g')"
|
cur_ver="${cur_ver//./\\.}"
|
||||||
|
|
||||||
for f in .env README.md; do
|
declare -a upd_files=( .env README.md )
|
||||||
sed -i "s/${cur_ver}/${new_ver}/g" "$f"
|
if [ -f tls/README.md ]; then
|
||||||
done
|
upd_files+=( tls/README.md )
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed -i "s/${cur_ver}/${new_ver}/g" "${upd_files[@]}"
|
||||||
|
|
||||||
git_status="$(git status --porcelain)"
|
git_status="$(git status --porcelain)"
|
||||||
if [[ ${git_status} ]]; then
|
if [[ ${git_status} ]]; then
|
||||||
|
|
Loading…
Reference in New Issue