2022-06-23 18:34:33 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: update-script
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Update flake
|
|
|
|
image: nixos/nix
|
|
|
|
commands:
|
2022-06-24 05:52:30 +00:00
|
|
|
- echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
2022-06-23 18:34:33 +00:00
|
|
|
- nix flake update
|
2022-06-25 19:52:37 +00:00
|
|
|
- name: Update minecraft
|
|
|
|
image: nixery.dev/shell/curl/jq
|
|
|
|
commands:
|
2022-06-25 20:26:23 +00:00
|
|
|
- (cd minecraft && bash ./update.sh)
|
2022-06-25 19:52:37 +00:00
|
|
|
depends_on:
|
|
|
|
- Update flake
|
|
|
|
- name: Update mastodon-glitch
|
2022-06-28 09:08:22 +00:00
|
|
|
image: nixos/nix
|
2022-06-25 19:52:37 +00:00
|
|
|
commands:
|
2022-06-28 09:14:27 +00:00
|
|
|
- (cd mastodon && ./update.sh)
|
2022-06-25 19:52:37 +00:00
|
|
|
environment:
|
|
|
|
USER: nobody
|
|
|
|
depends_on:
|
|
|
|
- Update flake
|
|
|
|
- name: Update matrix-media-repo
|
2022-06-28 09:08:22 +00:00
|
|
|
image: nixos/nix
|
2022-06-25 19:52:37 +00:00
|
|
|
commands:
|
2022-06-28 09:19:03 +00:00
|
|
|
- mkdir -p /etc/nix
|
2022-06-28 07:39:11 +00:00
|
|
|
- echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
2022-06-28 09:14:27 +00:00
|
|
|
- (cd matrix/matrix-media-repo && ./update.sh)
|
2022-06-25 19:52:37 +00:00
|
|
|
environment:
|
|
|
|
USER: nobody
|
|
|
|
depends_on:
|
|
|
|
- Update flake
|
|
|
|
- name: Update mautrix-whatsapp
|
2022-06-28 09:08:22 +00:00
|
|
|
image: nixos/nix
|
2022-06-25 19:52:37 +00:00
|
|
|
commands:
|
2022-06-28 09:19:03 +00:00
|
|
|
- mkdir -p /etc/nix
|
2022-06-28 07:39:11 +00:00
|
|
|
- echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
2022-06-28 09:14:27 +00:00
|
|
|
- (cd matrix/mautrix-whatsapp && ./update.sh)
|
2022-06-25 19:52:37 +00:00
|
|
|
environment:
|
|
|
|
USER: nobody
|
|
|
|
depends_on:
|
|
|
|
- Update flake
|
|
|
|
- name: Update art
|
2022-06-25 20:32:58 +00:00
|
|
|
image: nixery.dev/shell/nix-prefetch-git/jq/gnugrep
|
2022-06-25 19:52:37 +00:00
|
|
|
commands:
|
2022-06-25 20:26:23 +00:00
|
|
|
- (cd art && bash ./update.sh)
|
2022-06-25 19:52:37 +00:00
|
|
|
environment:
|
|
|
|
USER: nobody
|
|
|
|
depends_on:
|
|
|
|
- Update flake
|
|
|
|
- name: Format nix
|
|
|
|
image: nixery.dev/shell/alejandra
|
|
|
|
commands:
|
|
|
|
- alejandra .
|
|
|
|
depends_on:
|
|
|
|
- Update minecraft
|
|
|
|
- Update mastodon-glitch
|
|
|
|
- Update matrix-media-repo
|
|
|
|
- Update mautrix-whatsapp
|
|
|
|
- Update art
|
2022-06-23 18:34:33 +00:00
|
|
|
- name: Push git
|
2022-06-28 12:08:23 +00:00
|
|
|
image: nixery.dev/shell/gitfull/git-lfs/shadow
|
2022-06-24 06:35:35 +00:00
|
|
|
commands:
|
2022-06-28 12:08:23 +00:00
|
|
|
- groupadd -g 0 root
|
2022-06-29 07:10:21 +00:00
|
|
|
- useradd -u 0 -G root -b $HOME root
|
2022-06-24 06:35:35 +00:00
|
|
|
- mkdir ~/.ssh
|
|
|
|
- echo "$SSH_KEY" > ~/.ssh/id_ed25519
|
|
|
|
- chmod 600 ~/.ssh/id_ed25519
|
|
|
|
- echo "git.chir.rs ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICQ77jA9S5qXDFGPLZRsC++AtxiXXeF8gVbkLlglx0GQ" > ~/.ssh/known_hosts
|
|
|
|
- echo "git.chir.rs ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDY0pZzNTAqaVqqfC31gYFixFs5KySv0UqvlDEAzEXJMB/pBWkE5GAd5Ik1NxD4QiAVWc2UARdmJEBbYf8mk5JiAv6fjsodJdJVRau4Ax7FtIfbxdFyzBgFery/KUnNIr6cmAWU2Af8JhzrnpEbhe5U3LftYnkdE1lI+iVqaQRARp0qikdzoAl3uMUhbdTxp1/6rtfN6bP2XZCsUx3t3W5ZG1QTQz8l7nrbXZX1TT3pZ2vcUANcMtOxEAwO6lbL210GX63C8XEoE7+4lLxRrSiaq3SkVlG07VspozKEtrrcsqCRNLebiaapmNWVoEq9Wd9VGAEjja5efyU6/HUlRogAOo1WP73UwoQLv5LTFH+ECoHhKS14xfPeXeVG8dbYyh5+CnmiVe43dH1qZw+ceYuYel31f47cAgScbxFvNkct0spK9m9mivnoUmYcxwTc+VbFbmnJvSuZw3a+OEYn9biitP/tTkYFiLZVdPZTxDkvd1oOyuVH9d4RMXbVgNS92/lr2iKFZkyhWMJ61hFMc2tupwmkp5Us5ce42XA0zC/aVY3vYoih/c5Ib0eZF1AEJdB6Bt5dWqITVsB3mip3Jn/mqVBIPTGXT6+FnGSEuL68Dj2yKBD7kj8YO/1SWpkVMy+bfoLXY/usgcaLCxpUu8dDrdrcKExLigCVbi3rdRmg7w==" >> ~/.ssh/known_hosts
|
|
|
|
- git remote set-url origin gitea@git.chir.rs:darkkirb/nix-packages.git
|
2022-06-24 07:37:09 +00:00
|
|
|
- git config --global 'user.email' 'gitea-bot@chir.rs'
|
|
|
|
- git config --global 'user.name' 'Gitea Bot'
|
2022-06-24 06:35:35 +00:00
|
|
|
- git add .
|
|
|
|
- git commit -am "Update packages"
|
2022-06-24 06:53:22 +00:00
|
|
|
- git push --force origin main:update-package
|
2022-06-24 07:06:39 +00:00
|
|
|
environment:
|
|
|
|
SSH_KEY:
|
|
|
|
from_secret: SSH_KEY
|
2022-06-25 19:54:20 +00:00
|
|
|
depends_on:
|
|
|
|
- Format nix
|
2022-06-23 18:34:33 +00:00
|
|
|
- name: Create pull request
|
2022-06-25 19:52:37 +00:00
|
|
|
image: nixery.dev/shell/curl
|
2022-06-23 18:34:33 +00:00
|
|
|
commands:
|
|
|
|
- |
|
2022-06-25 19:52:37 +00:00
|
|
|
echo '{ "assignee": "DarkKirb", "base": "main", "head": "update-package", "title": "Update packages", "body": "" }' | curl -XPOST 'https://git.chir.rs/api/v1/repos/DarkKirb/nix-packages/pulls' -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $AUTHORISATION" --data-binary @-
|
2022-06-23 18:34:33 +00:00
|
|
|
environment:
|
|
|
|
AUTHORISATION:
|
|
|
|
from_secret: GITEA_KEY
|
2022-06-25 19:54:20 +00:00
|
|
|
depends_on:
|
|
|
|
- Push git
|
2022-06-23 18:34:33 +00:00
|
|
|
trigger:
|
2022-06-24 08:22:20 +00:00
|
|
|
event:
|
2022-06-28 12:08:23 +00:00
|
|
|
- cron
|
|
|
|
cron:
|
|
|
|
- updater
|
2022-06-23 18:34:33 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: notify-hydra
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Notify hydra
|
2022-06-25 19:52:37 +00:00
|
|
|
image: nixery.dev/shell/curl
|
2022-06-23 18:34:33 +00:00
|
|
|
commands:
|
2022-06-23 18:35:51 +00:00
|
|
|
- curl --get --data-urlencode "jobsets=darkkirb:nix-packages" https://hydra.chir.rs/api/push
|
2022-06-24 05:52:30 +00:00
|
|
|
trigger:
|
2022-06-25 08:21:06 +00:00
|
|
|
event:
|
|
|
|
- push
|
2022-06-24 05:52:30 +00:00
|
|
|
branch:
|
|
|
|
- main
|