From 9aab55b9a5f44d7feaf6abd3312520a823a8ee38 Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Sat, 12 Oct 2024 00:29:40 +0200 Subject: [PATCH] chore: improve workflows --- .forgejo/workflows/ds-fr.yaml | 56 ----------------------------------- .forgejo/workflows/eval.yaml | 18 ++++------- 2 files changed, 5 insertions(+), 69 deletions(-) delete mode 100644 .forgejo/workflows/ds-fr.yaml diff --git a/.forgejo/workflows/ds-fr.yaml b/.forgejo/workflows/ds-fr.yaml deleted file mode 100644 index f54b414..0000000 --- a/.forgejo/workflows/ds-fr.yaml +++ /dev/null @@ -1,56 +0,0 @@ -name: ds-fr update -on: - schedule: - - cron: "26 18 * * wed" - -jobs: - npins_update: - runs-on: nix - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.TEA_DGNUM_CHORES_TOKEN }} - - - name: Update DS and open PR if necessary - run: | - # Fetch the latest release tag - VERSION=$(curl -L \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/demarches-simplifiees/demarches-simplifiees.fr/releases/latest \ - | jq -r '.tag_name') - - # Move to the ds-fr directory - cd machines/compute01/ds-fr/package - - # Run the update script - ./update.sh -v "$VERSION" - - if [ ! -z "$(git diff --name-only)" ]; then - echo "[+] Changes detected, pushing updates." - - git switch -C ds-update - - git add . - - git config user.name "DGNum Chores" - git config user.email "tech@dgnum.eu" - - git commit --message "chore(ds-fr): Update" - git push --set-upstream origin ds-update --force - - # Connect to the server with the cli - tea login add \ - -n dgnum-chores \ - -t '${{ secrets.TEA_DGNUM_CHORES_TOKEN }}' \ - -u https://git.dgnum.eu - - # Create a pull request if needed - # i.e. no PR with the same title exists - if [ -z "$(tea pr ls -f='title,author' -o simple | grep 'chore(ds-fr): Update dgnum-chores')" ]; then - tea pr create \ - --description "Automatic ds-fr update" \ - --title "chore(ds-fr): Update" \ - --head ds-update - fi - fi diff --git a/.forgejo/workflows/eval.yaml b/.forgejo/workflows/eval.yaml index c431558..8a70c64 100644 --- a/.forgejo/workflows/eval.yaml +++ b/.forgejo/workflows/eval.yaml @@ -9,20 +9,12 @@ on: - main jobs: - build_and_cache_krz01: + build_krz01: runs-on: nix steps: - uses: actions/checkout@v3 - - name: Build and cache the node - run: nix-shell --run cache-node - env: - STORE_ENDPOINT: "https://tvix-store.dgnum.eu/infra-signing/" - STORE_USER: "admin" - BUILD_NODE: "krz01" - - - uses: actions/upload-artifact@v3 - if: always() - with: - name: outputs_krz01 - path: paths.txt + - name: Build krz01 + run: | + # Enter the shell + nix-shell --run 'colmena build --on krz01'