update flakes #177
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 flakes" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "30 11 * * 1" | |
jobs: | |
flake: | |
continue-on-error: true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
fetch-depth: 0 | |
- name: "provision home-mananger" | |
uses: ./.github/actions/runner | |
id: runner | |
- name: "update system" | |
run: | | |
update | |
# Purge needed for merge. | |
rm -rf nix/sensitive/.git nix/home/users/user.nix | |
shell: fish {0} | |
- name: "create pr" | |
run: | | |
git config user.name '${{ github.actor }}' | |
git config user.email '${{ github.actor }}@users.noreply.github.com' | |
git commit -am "βοΈ: flake update" | |
git push -f origin main:flake-update | |
gh pr create --title "βοΈ" --base main --head flake-update --body ":tada:" || echo pr already exists | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }} | |
dots-flake: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
fetch-depth: 0 | |
- name: "provision home-mananger" | |
uses: ./.github/actions/runner | |
id: runner | |
- name: "update cargo" | |
run: | | |
prs rust | |
shell: fish {0} | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }} | |
- name: "flake cleanup" | |
run: | | |
unlock dots-manager | |
nix flake check . | |
unlock | |
unlock dots-manager | |
# Purge needed for merge. | |
rm -rf nix/sensitive/.git nix/home/users/user.nix | |
shell: fish {0} | |
- name: "create pr" | |
run: | | |
git config user.name '${{ github.actor }}' | |
git config user.email '${{ github.actor }}@users.noreply.github.com' | |
git commit -am "π¦: cargo update" && { | |
git push -f origin main:cargo-update | |
gh pr create --title "π¦" --base main --head cargo-update --body ":tada:" || echo pr already exists | |
} || echo Nothing to commit?\n $(git status) | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }} |