Update the flake dependencies and run test suite. #39
This file contains 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: Update dependencies and run tests | |
run-name: Update the flake dependencies and run test suite. | |
on: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
Update-JSON-Data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setting up Checkout | |
uses: actions/checkout@v3 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Nix | |
uses: cachix/install-nix-action@v18 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update flake inputs | |
run: | | |
nix flake update | |
- name: Run tests | |
run: | | |
nix flake check | |
- name: Set up Git config | |
run: | | |
git config user.name "github-actions" | |
git config user.email "<>" | |
- name: Commit and push changes | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
git add . | |
git commit -m "[ghactions] Update registry and registry-index" | |
git push | |
else | |
echo "No changes!" | |
fi |