Skip to content

Flake Automated Update #42

Flake Automated Update

Flake Automated Update #42

Workflow file for this run

name: "Flake Automated Update"
on:
workflow_dispatch:
schedule:
- cron: '0 11 * * *'
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
with:
token: '${{ secrets.ACTION_GITHUB_TOKEN }}'
- name: Install nix
uses: cachix/install-nix-action@master
with:
github_access_token: '${{ secrets.ACTION_GITHUB_TOKEN }}'
- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@master
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Configure git credentials
run: |
git config --global user.email "${{ steps.import-gpg.outputs.email }}"
git config --global user.name "${{ steps.import-gpg.outputs.name }}"
- name: Setup cachix
uses: cachix/cachix-action@master
with:
name: antares0982
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Nix flake update
run: |
nix flake update --commit-lock-file
- name: Nix develop check
run: |
nix develop --command echo DONE
nix flake check
if [ -z $(git status --porcelain) ]; then
echo "clean, skip..."
else
git add --all
git commit --message "Flake Update"
fi
- name: Git push
run: |
git config --global pull.rebase false
git pull
git push