Check version of nixos-search #288
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Check version of nixos-search" | |
| on: | |
| schedule: | |
| - cron: '0 */12 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| main: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check nixos-search version | |
| run: | | |
| VERSION_CONTENT=$(curl --silent "https://raw.githubusercontent.com/nixos/nixos-search/main/VERSION" | tr -d '[:space:]') | |
| # NOTE: this number and the version number in src/search.rs have | |
| # to be updated when nixos-search updates it's version number. | |
| VERSION_NUMBER=44 | |
| echo "Found VERSION: $VERSION_CONTENT" | |
| if [ "$VERSION_CONTENT" != "$VERSION_NUMBER" ]; then | |
| echo "::error:: Expected version $VERSION_NUMBER, but found $VERSION_CONTENT" | |
| exit 1 | |
| fi | |
| echo "Version check passed. nixos-search version is $VERSION_NUMBER." |