Skip to content

Update version.nix #1655

Update version.nix

Update version.nix #1655

name: Update version.nix
on:
workflow_dispatch: # allows manual triggering
schedule:
# Every hour Feb-Dec Fri-Sun
- cron: '0 */1 * 2-11 5,6,0'
# Once / day Feb-Dec other days
- cron: '0 0 * 2-11 1-4'
# Once a week Fridays Dec-Jan
- cron: '0 0 * 1,12 FRI'
jobs:
version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Update version.nix
run: ./update.sh
- name: Extract version info to output
id: version
run: |
cat version.nix | grep "=" | sed 's/[ ";]//g' >> $GITHUB_OUTPUT
echo "file<<EOF" >> $GITHUB_OUTPUT
echo "$(cat version.nix)" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
title: Update to version ${{ steps.version.outputs.version }}
commit-message: Update to version ${{ steps.version.outputs.version }}
body: |
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
```
${{ steps.version.outputs.file }}
```
branch: actions/update_version
labels: | # Labels to be set on the PR
updates
automated