From e27790cf28f68f6184d4c50afe37117b7830113d Mon Sep 17 00:00:00 2001 From: catvayor Date: Wed, 9 Apr 2025 18:27:09 +0200 Subject: [PATCH] fix(worflows/npins-update): don't try to open PR if not needed --- .forgejo/workflows/npins-update.yaml | 240 +++++++++++++-------------- workflows/npins-update.nix | 2 +- 2 files changed, 121 insertions(+), 121 deletions(-) diff --git a/.forgejo/workflows/npins-update.yaml b/.forgejo/workflows/npins-update.yaml index e26011d1..1fdab3a1 100644 --- a/.forgejo/workflows/npins-update.yaml +++ b/.forgejo/workflows/npins-update.yaml @@ -31,10 +31,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" arkheon: runs-on: nix steps: @@ -60,10 +60,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" cas-eleves: runs-on: nix steps: @@ -89,10 +89,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" cgroup-exporter: runs-on: nix steps: @@ -118,10 +118,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" colmena: runs-on: nix steps: @@ -147,10 +147,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" dgsi: runs-on: nix steps: @@ -176,10 +176,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" disko: runs-on: nix steps: @@ -205,10 +205,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" dns_nix: runs-on: nix steps: @@ -234,10 +234,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" git-hooks: runs-on: nix steps: @@ -263,10 +263,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" kadenios: runs-on: nix steps: @@ -292,10 +292,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" kahulm: runs-on: nix steps: @@ -321,10 +321,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; 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: @@ -350,10 +350,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; 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: @@ -379,10 +379,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" linkal: runs-on: nix steps: @@ -408,10 +408,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" lix: runs-on: nix steps: @@ -437,10 +437,10 @@ jobs: -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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" lix-module: runs-on: nix steps: @@ -466,10 +466,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" lon: runs-on: nix steps: @@ -495,10 +495,10 @@ jobs: -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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" metis: runs-on: nix steps: @@ -524,10 +524,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" microvm_nix: runs-on: nix steps: @@ -553,10 +553,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" nix-actions: runs-on: nix steps: @@ -582,10 +582,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" nix-modules: runs-on: nix steps: @@ -611,10 +611,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" nix-pkgs: runs-on: nix steps: @@ -640,10 +640,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" nix-reuse: runs-on: nix steps: @@ -669,10 +669,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" nixos-24_05: runs-on: nix steps: @@ -698,10 +698,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" nixos-24_11: runs-on: nix steps: @@ -727,10 +727,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" nixos-generators: runs-on: nix steps: @@ -756,10 +756,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" nixos-unstable: runs-on: nix steps: @@ -785,10 +785,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" signal-irc-bridge: runs-on: nix steps: @@ -814,10 +814,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" stateless-uptime-kuma: runs-on: nix steps: @@ -843,10 +843,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" wp4nix: runs-on: nix steps: @@ -872,10 +872,10 @@ jobs: \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" + no PR with the same title exists\n if [ -z $(tea pr ls -f='head' -o simple + | grep \"$GIT_UPDATE_BRANCH\") ]; then\n tea pr create --description \"\ + Automatic npins update\" --title \"$COMMIT_MESSAGE\" --head \"$GIT_UPDATE_BRANCH\"\ + \n fi\nfi\n" name: Update dependencies on: schedule: diff --git a/workflows/npins-update.nix b/workflows/npins-update.nix index 7163aaea..56c4e6a5 100644 --- a/workflows/npins-update.nix +++ b/workflows/npins-update.nix @@ -81,7 +81,7 @@ in # 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 "$COMMIT_MESSAGE dgnum-chores") ]; then + if [ -z $(tea pr ls -f='head' -o simple | grep "$GIT_UPDATE_BRANCH") ]; then tea pr create --description "Automatic npins update" --title "$COMMIT_MESSAGE" --head "$GIT_UPDATE_BRANCH" fi fi