-
Notifications
You must be signed in to change notification settings - Fork 96
52 lines (40 loc) · 1.33 KB
/
auto-update-versions.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
name: Auto-update versions
#
# Takes care of updating the Vespa version in the documentation.
#
on:
workflow_dispatch: # Allow manual triggering of the workflow
schedule:
- cron: "0 0 * * *"
repository_dispatch:
types: [update-vespa-version]
# For testing purposes
push:
branches: [auto-update-versions]
permissions:
contents: write
pull-requests: write
jobs:
update-vespa-version:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup Dependencies
run: |
sudo apt-get update
sudo apt-get install -y xq
- name: Get Latest Vespa version
run: |
VESPA_VERSION=$(curl -sSL https://repo1.maven.org/maven2/com/yahoo/vespa/parent/maven-metadata.xml | \
xq -x '/metadata/versioning/latest')
echo "Vespa version: $VESPA_VERSION"
sed -i'' "s/vespa_version: \"[0-9\.]*\"/vespa_version: \"\${VESPA_VERSION}\"/" _config.yml
git diff
changes=\$(git status --porcelain | wc -l)
if (( changes > 0 )); then
echo "Updating Vespa version in documentation to \${VESPA_VERSION}"
git commit -m "Update Vespa-version to \${VESPA_VERSION} MERGEOK" _config.yml
git pull --rebase
# Temp disabled while testing
# git push
fi