-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (57 loc) · 1.59 KB
/
readme.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: update README.md
on:
pull_request:
types: [closed]
jobs:
readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "0"
- name: Update datasource in Dockerfile
run: |
sed \
--regexp-extended \
--quiet \
's/.*alpine:([0-9]).([0-9]+).*/\1 \2/p' Dockerfile | \
xargs \
--max-args=2 \
bash \
-c \
'sed \
--in-place \
--regexp-extended \
"s/alpine_[0-9]_[0-9]+/alpine_${0}_${1}/" Dockerfile'
- name: Update component versions in README.md
run: |
sed \
--regexp-extended \
--quiet \
's/(ARG|ENV)\s*(.*)_VERSION(=|\s*)(.*)/\L\2 (\4)/p' Dockerfile | \
xargs \
--max-args=2 \
bash \
-c \
'sed \
--in-place \
--regexp-extended \
"s/${0}.*$/${0} ${1}/" README.md'
- name: Update alpine version in README.md
run: |
sed \
--regexp-extended \
--quiet \
's/FROM\s+alpine:(.*)/(\1)/p' Dockerfile | \
xargs \
bash \
-c \
'sed \
--in-place \
--regexp-extended \
"s/linux (.*) with/linux ${0} with/" README.md'
- name: Push updated README.md
uses: EndBug/add-and-commit@v9
with:
message: "README: update version"
default_author: github_actions