From 7680277ca1e630b5355084789d427a5a2e460e9c Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Sat, 10 Aug 2024 23:40:35 +0100 Subject: [PATCH] ci: switch over to using forgejo actions --- .forgejo/workflows/push.yaml | 33 ++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 37 ------------------------------------ 2 files changed, 33 insertions(+), 37 deletions(-) create mode 100644 .forgejo/workflows/push.yaml delete mode 100644 .gitlab-ci.yml diff --git a/.forgejo/workflows/push.yaml b/.forgejo/workflows/push.yaml new file mode 100644 index 0000000..70ed998 --- /dev/null +++ b/.forgejo/workflows/push.yaml @@ -0,0 +1,33 @@ +name: On_Push + +on: + push: + branches: + - 'main' + paths: + - .forgejo/**/* + - Committee/**/Handovers/* + - Minutes/**/* + - Committee/**/Budget/* + - Events/**/* + +jobs: + # rust code must be formatted for standardisation + pdfs: + # build it using teh base nixos system, helps with caching + runs-on: nix + strategy: + matrix: + script: [ handovers, minutes, budget, events ] + steps: + # get the repo first + - uses: https://code.forgejo.org/actions/checkout@v4 + # actual script to run the build process + - run: nix run .#${{ matrix.script }} + - run: ls -lah + - run: ls -lah pdf_${{ matrix.script }}/ + # upload the files + - uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + with: + name: PDFs-${{ matrix.script }} + path: pdf_${{ matrix.script }}/ \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 48bcd78..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,37 +0,0 @@ -stages: - - build - -pdf: - tags: - - nix - before_script: - # basic stuff - - nix --extra-experimental-features 'nix-command flakes' profile install nixpkgs#bash - - # setup the cache stuff - - nix --extra-experimental-features 'nix-command flakes' profile install nixpkgs#attic-client - - attic login skynet https://nix-cache.skynet.ie/ $CACHE_KEY - - attic use skynet-cache - stage: build - # what it runs - script: - - attic watch-store skynet-cache & - - nix --extra-experimental-features 'nix-command flakes' run .#handovers - - nix --extra-experimental-features 'nix-command flakes' run .#minutes - - nix --extra-experimental-features 'nix-command flakes' run .#budget - - nix --extra-experimental-features 'nix-command flakes' run .#events - artifacts: - name: "PDFs" - paths: - - pdf_Handovers/ - - pdf_Minutes/ - - pdf_Budget/ - - pdf_Events/ - - errors.log - rules: - - if: '$CI_PROJECT_NAMESPACE == "compsoc1/compsoc" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - changes: - - Committee/**/Handovers/* - - Minutes/**/* - - Committee/**/Budget/* - - Events/**/* \ No newline at end of file