Skip to content

Update Versions

Update Versions #377

name: Update Versions
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Pip packages
run: pip install html2text pyyaml
- name: Update Version
id: update-version
run: |
OUTPUT=$(python ./.ci/update_versions.py)
# Parse the output for each update type
GARDENLINUX_VERSION_UPDATE=$(echo "$OUTPUT" | grep "GARDENLINUX_VERSION_UPDATE" | cut -d'=' -f2)
NVIDIA_DRIVER_VERSION_UPDATE=$(echo "$OUTPUT" | grep "NVIDIA_DRIVER_VERSION_UPDATE" | cut -d'=' -f2)
echo "has_update=$([[ $GARDENLINUX_VERSION_UPDATE == 'true' || $NVIDIA_DRIVER_VERSION_UPDATE == 'true' ]] && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
- name: Update History
id: update-history
if: ${{ steps.update-version.outputs.has_update == 'true' }}
run: |
python ./.ci/update_history.py
- name: Add versions commit to release branch
if: ${{ steps.update-version.outputs.has_update == 'true' }}
run: |
git checkout -b update-version
git add versions.yaml history.yaml
git config --global user.name "Garden Linux Builder"
git config --global user.email "gardenlinux@users.noreply.github.com"
git commit -am 'Update versions'
git push --set-upstream origin update-version
UPDATE_PR_LINK=$(gh pr create --base main --head update-version --title 'Update versions' --body "automated update")
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}