From f14ce08a17b9c0ab1f14ccf1c279892424625d89 Mon Sep 17 00:00:00 2001 From: Faustin Lammler Date: Mon, 24 Mar 2025 12:03:47 +0100 Subject: [PATCH] Long lines --- .github/workflows/backup.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/backup.yml b/.github/workflows/backup.yml index 659b627..11113c8 100644 --- a/.github/workflows/backup.yml +++ b/.github/workflows/backup.yml @@ -16,7 +16,6 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} steps: - # - uses: actions/checkout@v4 - name: Install requirements run: | sudo apt-get update @@ -26,12 +25,12 @@ jobs: # needed for sanity check NUMBER=$(gh api \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $GH_TOKEN" \ - -H "X-GitHub-Api-Version: 2022-11-28" repos/$REPO/pulls --jq '.[0].number') + -H "X-GitHub-Api-Version: 2022-11-28" \ + repos/$REPO/pulls --jq '.[0].number') TITLE=$(gh api \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $GH_TOKEN" \ - -H "X-GitHub-Api-Version: 2022-11-28" repos/$REPO/pulls --jq '.[0].title') + -H "X-GitHub-Api-Version: 2022-11-28" \ + repos/$REPO/pulls --jq '.[0].title') ID=$(gh api --method POST /user/migrations \ --raw-field "repositories[]=$REPO" \ --field lock_repositories=false \ @@ -44,13 +43,15 @@ jobs: - name: Wait until backup is finished run: | while true; do - STATE=$(gh api --method GET "/user/migrations/$EXPORT_ID" --jq '.state') + STATE=$(gh api --method GET "/user/migrations/$EXPORT_ID" \ + --jq '.state') [[ $STATE == "exported" ]] && break sleep 10 done - name: Download backup run: | - ARCHIVE_URL=$(gh api --method GET "/user/migrations/$EXPORT_ID" --jq '.archive_url') + ARCHIVE_URL=$(gh api --method GET "/user/migrations/$EXPORT_ID" \ + --jq '.archive_url') curl -L -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer $GH_TOKEN" \ -H "X-GitHub-Api-Version: 2022-11-28" \ @@ -72,6 +73,7 @@ jobs: if ! restic cat config >/dev/null 2>&1; then restic init fi - restic backup --host gh-runner --stdin --stdin-filename archive.tgz <./archive.tgz + restic backup --host gh-runner --stdin \ + --stdin-filename archive.tgz <./archive.tgz restic forget --prune --keep-within 6m restic check