forked from malobeo/infrastructure
Compare commits
9 Commits
e7c84aa4ee
...
test2
| Author | SHA1 | Date | |
|---|---|---|---|
|
d456c6e386
|
|||
|
b238750a16
|
|||
|
22e49eb5a1
|
|||
|
9648ff2adc
|
|||
|
9faf4de28d
|
|||
|
5634919fa6
|
|||
| 394c0610ce | |||
| 6dee590206 | |||
| b6cd2b57f8 |
31
.gitea/workflows/hydra-callback.yml
Normal file
31
.gitea/workflows/hydra-callback.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Weekly Flake Update
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
hydra_callback:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NIXPKGS_ALLOW_UNFREE: 1
|
||||
steps:
|
||||
- name: Install sudo
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y sudo
|
||||
- name: Set up Nix
|
||||
uses: https://github.com/cachix/install-nix-action@v31
|
||||
with:
|
||||
github_access_token: ${{ secrets.AHTLONS_GITHUB_TOKEN }}
|
||||
- name: Find pr number
|
||||
run: |
|
||||
echo PR=$(echo "${{ github.ref }}" | cut -d / -f 3) >> "$GITHUB_ENV"
|
||||
- name: run hydra wait
|
||||
run: |
|
||||
echo "Running now @ pr no $PR"
|
||||
nix run nixpkgs#hydra-cli -- -H https://hydra.dynamicdiscord.de jobset-wait malobeo2 "$PR"
|
||||
@@ -8,7 +8,7 @@ hosts are deployed automatically from master. The [hydra build server](https://h
|
||||
Big changes (like updating flake lock) could be commited to the staging branch first. [Hydra builds staging seperate](https://hydra.dynamicdiscord.de/jobset/malobeo/staging), and on success you can merge into master.
|
||||
|
||||
### deploy fresh host
|
||||
if you want to deploy a completly new host refer to [docs](https://docs.malobeo.org/anleitung/create.html)
|
||||
if you want to deploy a completldy new host refer to [docs](https://docs.malobeo.org/anleitung/create.html)
|
||||
|
||||
### testing configuration
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
- [musik](./projekte/musik.md)
|
||||
- [TODO](./todo.md)
|
||||
- [Modules]()
|
||||
- [Gitea-translator](./module/gitea-translator.md)
|
||||
- [Initrd-ssh](./module/initssh.md)
|
||||
- [Disks](./module/disks.md)
|
||||
- [How-to]()
|
||||
|
||||
21
doc/src/module/gitea-translator.md
Normal file
21
doc/src/module/gitea-translator.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Gitea-tanslator
|
||||
The module can be used by importing `inputs.self.nixosModules.malobeo.gitea-translator`
|
||||
|
||||
This module starts a python server that fetches the gitea pull request api and translates it to a file that hydra understands.
|
||||
To use, just set the parameters of the gitea server, then send a GET request to either `http://${host}:${port}/` or `http://${host}:${port}/gitea-pulls-sorted.json`
|
||||
|
||||
## Module config
|
||||
##### enable (default = false) - enables the module
|
||||
##### baseurl (default = "git.dynamicdiscord.de") - Base URL of the Gitea instance
|
||||
##### owner (default = "malobeo") - Repository owner
|
||||
##### repo (default = "infrastructure") - Repository name
|
||||
##### host (default = "127.0.0.1") - Address the server binds to
|
||||
##### port (default = 27364) - Port the server listens on
|
||||
|
||||
## Hydra config
|
||||
If you change the default port or host, the file `.hydra/spec.json` has to be modified accordingly.
|
||||
With the module running on the hydra host, create a new hydra project, then:
|
||||
|
||||
- Set `Declarative spec file` to `.hydra/spec.json`
|
||||
- Change declaritive input type to `Git checkout`
|
||||
- Set your git repo location in the field below that
|
||||
Reference in New Issue
Block a user