From c58f68bab2030fa91d0287f11c9012cf982ca1e1 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Sat, 11 Jan 2025 16:28:44 +0100 Subject: [PATCH] chore(workflows): Regenerate npins-update --- .forgejo/workflows/npins-update.yaml | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.forgejo/workflows/npins-update.yaml b/.forgejo/workflows/npins-update.yaml index 8f8f241..542e369 100644 --- a/.forgejo/workflows/npins-update.yaml +++ b/.forgejo/workflows/npins-update.yaml @@ -325,6 +325,35 @@ jobs: -o simple | grep \"$COMMIT_MESSAGE dgnum-chores\") ]; then\n tea pr create --description \"Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\n fi\nfi\n" + kat-pkgs: + runs-on: nix + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + token: ${{ secrets.TEA_DGNUM_CHORES_TOKEN }} + - env: + GIT_UPDATE_BRANCH: npins-updates/kat-pkgs + name: Switch to a new branch + run: "if git ls-remote --exit-code --heads origin \"refs/heads/$GIT_UPDATE_BRANCH\"\ + ; then\n git switch \"$GIT_UPDATE_BRANCH\"\n git rebase main\n echo \"\ + EXISTING_BRANCH=1\" >> $GITHUB_ENV\nelse\n git switch -C \"$GIT_UPDATE_BRANCH\"\ + \nfi\n" + - env: + COMMIT_MESSAGE: 'chore(npins): Update kat-pkgs' + GIT_UPDATE_BRANCH: npins-updates/kat-pkgs + name: Open a PR if updates are present + run: "npins update kat-pkgs\n\nif [ ! -z \"$(git diff --name-only)\" ]; then\n\ + \ echo \"[+] Changes detected, pushing updates.\"\n\n git add npins\n\n\ + \ if [ -n \"$EXISTING_BRANCH\" ]; then\n git commit --amend --no-edit\n\ + \ git push --force\n else\n git commit --message \"$COMMIT_MESSAGE\"\ + \n git push -u origin \"$GIT_UPDATE_BRANCH\"\n fi\n\n # Connect to the + server with the cli\n tea login add -n dgnum-chores -t \"${{ secrets.TEA_DGNUM_CHORES_TOKEN + }}\" -u https://git.dgnum.eu\n\n # Create a pull request if needed\n # i.e. + no PR with the same title exists\n if [ -z $(tea pr ls -f='title,author' + -o simple | grep \"$COMMIT_MESSAGE dgnum-chores\") ]; then\n tea pr create + --description \"Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head + \"$GIT_UPDATE_BRANCH\"\n fi\nfi\n" liminix: runs-on: nix steps: