Compare commits
3 commits
e631dbf1ce
...
8bc98a55a3
Author | SHA1 | Date | |
---|---|---|---|
|
8bc98a55a3 | ||
|
6b5b8cd9bf | ||
|
56b672def4 |
1 changed files with 12 additions and 75 deletions
|
@ -5,7 +5,7 @@ on:
|
|||
branches:
|
||||
- '**'
|
||||
schedule:
|
||||
- cron: '50 12 * * *' # not to frequent, GitHub only allows a few pulls per hour
|
||||
- cron: '30 2 * * *' # not to frequent, GitHub only allows a few pulls per hour
|
||||
|
||||
jobs:
|
||||
nix build:
|
||||
|
@ -15,6 +15,7 @@ jobs:
|
|||
|
||||
- name: update nix flakes
|
||||
if: ${{ github.event_name == 'schedule' }}
|
||||
# we need to use our ssh key here because we need access to private flakes
|
||||
run: |
|
||||
cat <<EOF > .ssh_key
|
||||
${{ secrets.SSH_KEY }}
|
||||
|
@ -30,22 +31,23 @@ jobs:
|
|||
kill $SSH_AGENT_PID
|
||||
rm .ssh_key
|
||||
|
||||
- name: nix flake archive
|
||||
- name: nix flake archive/check
|
||||
# we need to use our ssh key here because we need access to private flakes
|
||||
run: |
|
||||
cat <<EOF > .id_rsa
|
||||
cat <<EOF > .ssh_key
|
||||
${{ secrets.SSH_KEY }}
|
||||
EOF
|
||||
chmod 600 .id_rsa
|
||||
chmod 600 .ssh_key
|
||||
|
||||
eval $(ssh-agent)
|
||||
ssh-add .id_rsa
|
||||
ssh-add .ssh_key
|
||||
|
||||
nix flake archive
|
||||
nix flake check --verbose --log-format raw
|
||||
|
||||
echo $SSH_AGENT_PID
|
||||
kill $SSH_AGENT_PID
|
||||
rm .id_rsa
|
||||
rm .ssh_key
|
||||
|
||||
- name: nix build orbi
|
||||
run: nix build .#nixosConfigurations.orbi.config.system.build.toplevel
|
||||
|
@ -59,78 +61,13 @@ jobs:
|
|||
- name: nix build chungus
|
||||
run: nix build .#nixosConfigurations.chungus.config.system.build.toplevel
|
||||
|
||||
- name: push
|
||||
- name: commit & push
|
||||
if: ${{ github.event_name == 'schedule' }}
|
||||
# only if all nix builds are fine we update our branch
|
||||
run: |
|
||||
git config --local user.email "action@git.ingolf-wagner.de"
|
||||
git config --local user.name "Forgejo Action"
|
||||
git config --local user.name "Forgejo Action :robot:"
|
||||
|
||||
git diff --quiet && \
|
||||
git diff --staged --quiet || \
|
||||
(git commit -am "Update Nix flakes" && git push)
|
||||
|
||||
#name: Build all NixOS Configurations
|
||||
|
||||
#on:
|
||||
# - push
|
||||
# #schedule:
|
||||
# # - cron: "20 12 * * *" # not to frequent, GitHub only allows a few pulls per hour
|
||||
|
||||
#jobs:
|
||||
|
||||
# nix build:
|
||||
# runs-on: native
|
||||
# steps:
|
||||
|
||||
# - name: checkout repository
|
||||
# uses: actions/checkout@v2
|
||||
# with:
|
||||
# depth: 0
|
||||
|
||||
# - name: update nix flakes
|
||||
# #if: github.event_name == 'schedule'
|
||||
# run: |
|
||||
# cat <<EOF > .ssh_key
|
||||
# ${{ secrets.SSH_KEY }}
|
||||
# EOF
|
||||
# chmod 600 .ssh_key
|
||||
|
||||
# eval $(ssh-agent)
|
||||
# ssh-add .ssh_key
|
||||
|
||||
# nix flake update
|
||||
#
|
||||
# echo $SSH_AGENT_PID
|
||||
# kill $SSH_AGENT_PID
|
||||
# rm .ssh_key
|
||||
|
||||
# - name: fetch and check
|
||||
# run: |
|
||||
# cat <<EOF > .ssh_key
|
||||
# ${{ secrets.SSH_KEY }}
|
||||
# EOF
|
||||
# chmod 600 .ssh_key
|
||||
|
||||
# eval $(ssh-agent)
|
||||
# ssh-add .ssh_key
|
||||
|
||||
# nix flake archive
|
||||
# nix flake check --verbose --log-format raw
|
||||
#
|
||||
# echo $SSH_AGENT_PID
|
||||
# kill $SSH_AGENT_PID
|
||||
# rm .ssh_key
|
||||
|
||||
# - name: nix build orbi
|
||||
# run: nix build .#nixosConfigurations.orbi.config.system.build.toplevel
|
||||
|
||||
# - name: nix build cream
|
||||
# run: nix build .#nixosConfigurations.cream.config.system.build.toplevel
|
||||
|
||||
# - name: nix build cherry
|
||||
# run: nix build .#nixosConfigurations.cherry.config.system.build.toplevel
|
||||
|
||||
# - name: nix build chungus
|
||||
# run: nix build .#nixosConfigurations.chungus.config.system.build.toplevel
|
||||
|
||||
|
||||
(git commit -am ":arrow_up: nix flake update" && git push)
|
||||
|
|
Loading…
Reference in a new issue