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