From 1c4c34b91648edc28fd507794e553498fb1ada68 Mon Sep 17 00:00:00 2001 From: Marlon Saglia Date: Mon, 12 Aug 2024 11:19:49 +0200 Subject: [PATCH] feat: add auto-update versions workflow The new workflow added in `.github/workflows/auto-update-versions.yml` takes care of automatically updating the Vespa version in the project's documentation. The workflow is triggered either manually or on a daily schedule, and it fetches the latest Vespa version from the Maven repository and updates the relevant files in the repository. --- .github/workflows/auto-update-versions.yml | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/auto-update-versions.yml diff --git a/.github/workflows/auto-update-versions.yml b/.github/workflows/auto-update-versions.yml new file mode 100644 index 0000000000..36590772ea --- /dev/null +++ b/.github/workflows/auto-update-versions.yml @@ -0,0 +1,33 @@ +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 * * *" + + # For testing purposes + push: + branches: [auto-update-versions] + +permissions: + contents: write + pull-requests: write + +jobs: + update-vespa-version: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Get Latest Vespa version + run: | + VESPA_VERSION=$(curl -sSL https://repo1.maven.org/maven2/com/yahoo/vespa/parent/maven-metadata.xml | \ + grep -oP '\K([0-9]+\.[0-9]+\.[0-9]+)') + + xq --version + echo "Vespa version: $VESPA_VERSION"