2023-10-03 14:49:47 +02:00
|
|
|
name: update-flake-lock
|
|
|
|
run-name: ${{ github.actor }} - update-flake-lock
|
2023-11-30 07:01:52 +01:00
|
|
|
on:
|
2023-11-30 07:27:47 +01:00
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * 6'
|
|
|
|
# “At 00:00 on Saturday.”
|
2023-10-02 12:08:16 +02:00
|
|
|
jobs:
|
2023-10-03 14:49:47 +02:00
|
|
|
update-flake-lock:
|
2023-10-02 12:08:16 +02:00
|
|
|
runs-on: docker
|
2023-10-03 13:47:28 +02:00
|
|
|
container:
|
2023-10-03 14:07:16 +02:00
|
|
|
image: alpine:edge
|
2023-10-02 12:08:16 +02:00
|
|
|
steps:
|
2023-10-03 13:53:46 +02:00
|
|
|
- name: "Setup Runner"
|
|
|
|
run: |
|
|
|
|
apk update
|
2023-11-30 07:25:45 +01:00
|
|
|
apk add git nodejs nix --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
|
2023-10-04 02:51:24 +02:00
|
|
|
git config --global user.email "${{github.actor}}"
|
|
|
|
git config --global user.name "Albert J. Copeland"
|
2023-12-08 11:59:34 +01:00
|
|
|
- name: "Setup SSh Keys"
|
|
|
|
run: |
|
|
|
|
echo ${secrets.PRIVATE_SSH_KEY} >
|
2023-11-30 07:20:28 +01:00
|
|
|
- uses: actions/checkout@v3
|
2023-10-03 07:11:21 +02:00
|
|
|
- name: "Directory Structure"
|
2023-10-03 04:47:57 +02:00
|
|
|
run: |
|
2023-10-03 05:11:56 +02:00
|
|
|
ls ${{ github.workspace }}/*
|
2023-11-30 07:20:28 +01:00
|
|
|
- name: "Git Info"
|
|
|
|
run: |
|
|
|
|
git -C ${{ github.workspace }} status
|
|
|
|
git -C ${{ github.workspace }} log
|
|
|
|
git -C ${{ github.workspace }} diff
|
2023-10-03 12:42:17 +02:00
|
|
|
- name: "Runner: Node Info"
|
|
|
|
run: |
|
|
|
|
id
|
|
|
|
uname -a
|
|
|
|
hostname
|
2023-10-03 14:00:28 +02:00
|
|
|
cat /etc/os-release
|
2023-10-03 14:10:47 +02:00
|
|
|
- name: "Nix Version"
|
|
|
|
run: |
|
|
|
|
nix --version
|
2023-10-04 03:29:20 +02:00
|
|
|
- name: "Nix Flake Update"
|
2023-10-03 14:27:00 +02:00
|
|
|
run: |
|
2023-10-03 14:49:47 +02:00
|
|
|
echo "Running Nix Flake Update"
|
|
|
|
cd /workspace/albert/nix
|
2023-10-04 10:42:05 +02:00
|
|
|
nix --extra-experimental-features "nix-command flakes" flake update
|
2023-10-03 14:49:47 +02:00
|
|
|
echo "Git Diff:"
|
|
|
|
git diff
|
2023-10-04 10:42:05 +02:00
|
|
|
- name: "Commit and Upload"
|
|
|
|
run: |
|
2023-10-04 11:32:38 +02:00
|
|
|
git commit -am "[ACTIONS] Flake Update"
|
2023-10-04 10:42:05 +02:00
|
|
|
git push
|
2023-10-04 02:42:45 +02:00
|
|
|
- if: success()
|
|
|
|
run: |
|
2023-10-04 11:17:48 +02:00
|
|
|
echo "Success!"
|
2023-10-03 07:20:25 +02:00
|
|
|
- if: always()
|
2023-10-03 07:46:16 +02:00
|
|
|
run: rm -rf /.cache
|
|
|
|
- if: always()
|
|
|
|
run: rm -rf ${{ github.worksspace }}
|