-
Notifications
You must be signed in to change notification settings - Fork 24
46 lines (39 loc) · 1.47 KB
/
update-deps.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
name: 'Update dependencies'
on:
push:
branches:
- 'scala-kore-bump'
workflow_dispatch:
# Stop in progress workflows on the same branch and same workflow to use latest committed code
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update-versions:
name: 'Update scala-kore version'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.JENKINS_GITHUB_PAT }}
- name: 'Configure GitHub user'
run: |
git config user.name devops
git config user.email [email protected]
- name: 'Update scala-kore release tag'
run: |
set -euxo pipefail
SCALA_KORE_VERSION="$(cat matching/deps/scala_kore_release)"
changed=false
sed -i 's!^ <scala-kore.version>.*</scala-kore.version>$! <scala-kore.version>'"${SCALA_KORE_VERSION}"'</scala-kore.version>!' matching/pom.xml
if git add matching/pom.xml && git commit -m "matching: update scala-kore to ${SCALA_KORE_VERSION}"; then
changed=true
fi
if [ "${changed}" = "true" ]; then
sed -i 's! mvnHash = "sha256-.*";! mvnHash = "";!' nix/overlay.nix
git add nix/overlay.nix && git commit -m "nix: invalidate maven packages hash" || true
fi
- name: 'Push updates'
run: git push