Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
docker-elk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
段孔乐
docker-elk
Commits
730ffa8d
Unverified
Commit
730ffa8d
authored
Nov 09, 2020
by
Antoine Cotten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send automated PR upon new stack release
parent
fe2aead4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
update.yml
.github/workflows/update.yml
+45
-0
No files found.
.github/workflows/update.yml
0 → 100644
View file @
730ffa8d
name
:
Update Elastic release
on
:
schedule
:
-
cron
:
'
0
0
*
*
0'
# At 00:00 every Sunday
jobs
:
check-and-update
:
name
:
Check and update Elastic release
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Get latest release version
uses
:
octokit/request-action@v2.x
id
:
get_latest_release
with
:
route
:
GET /repos/:repository/releases/latest
repository
:
elastic/elasticsearch
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
-
name
:
Update stack version
run
:
|
source .env
cur_ver="$ELK_VERSION"
new_ver=${{ fromJson(steps.get_latest_release.outputs.data).tag_name }}
# Escape dot characters so sed interprets them as literal dots
cur_ver="$(echo $cur_ver | sed 's/\./\\./g')"
# Trim leading 'v' in semantic version
new_ver="${new_ver:1}"
for f in .env docker-stack.yml README.md; do
sed -i "s/${cur_ver}/${new_ver}/g" "$f"
done
-
name
:
Send pull request to update to new version
uses
:
peter-evans/create-pull-request@v3
with
:
commit-message
:
Update to ${{ fromJson(steps.get_latest_release.outputs.data).tag_name }}
title
:
Update to ${{ fromJson(steps.get_latest_release.outputs.data).tag_name }}
delete-branch
:
true
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment