-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (65 loc) · 2.42 KB
/
dependency-updates.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
58
59
60
61
62
63
64
65
name: dependency-updates
on:
push:
branches:
- develop
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
jobs:
maven-update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: update maven version
id: update
run: |
MAVEN_VERSION="$(
git ls-remote --tags https://github.com/apache/maven "maven-3.*.*" \
| cut -d/ -f3 \
| sort -V \
| tail -1 \
| sed "s|\^{}||g" \
| sed "s|maven-||g"
)"
curl -sfL https://dlcdn.apache.org/maven/maven-3/"${MAVEN_VERSION}"/binaries/apache-maven-"${MAVEN_VERSION}"-bin.tar.gz || exit 1
sed -i "s|ARG MAVEN_VERSION=.*|ARG MAVEN_VERSION=$MAVEN_VERSION|" ./Dockerfile
echo "version=$MAVEN_VERSION" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
signoff: true
delete-branch: true
commit-message: update maven version to ${{ steps.update.outputs.version }}
branch: update-maven-version
title: update maven version to ${{ steps.update.outputs.version }}
body: update maven version to ${{ steps.update.outputs.version }}
maven4-update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: update maven4 version
id: update
run: |
MAVEN4_VERSION="$(
git ls-remote --tags https://github.com/apache/maven "maven-4.*.*" \
| cut -d/ -f3 \
| sort -V \
| tail -1 \
| sed "s|\^{}||g" \
| sed "s|maven-||g"
)"
curl -sfL https://dlcdn.apache.org/maven/maven-4/"${MAVEN4_VERSION}"/binaries/apache-maven-"${MAVEN4_VERSION}"-bin.tar.gz || exit 1
sed -i "s|ARG MAVEN4_VERSION=.*|ARG MAVEN4_VERSION=$MAVEN4_VERSION|" ./Dockerfile
echo "version=$MAVEN4_VERSION" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
signoff: true
delete-branch: true
commit-message: update maven4 version to ${{ steps.update.outputs.version }}
branch: update-maven4-version
title: update maven4 version to ${{ steps.update.outputs.version }}
body: update maven4 version to ${{ steps.update.outputs.version }}