From 443b21345bdb1a59dc3819fe63b4532372369773 Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Thu, 4 Apr 2024 08:12:03 +0200 Subject: [PATCH] Remove `update-tz` GitHub Action --- .github/bin/update-tz.sh | 42 --------------------------------- .github/workflows/update-tz.yml | 22 ----------------- 2 files changed, 64 deletions(-) delete mode 100755 .github/bin/update-tz.sh delete mode 100644 .github/workflows/update-tz.yml diff --git a/.github/bin/update-tz.sh b/.github/bin/update-tz.sh deleted file mode 100755 index 51ecd2a..0000000 --- a/.github/bin/update-tz.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -main() { - auth_header="$(git config --local --get http.https://github.com/.extraheader)" - git submodule sync --recursive - git -c "http.extraheader=$auth_header" -c protocol.version=2 \ - submodule update --init --force --recursive - - set -xeu - - cd tz - - git fetch --tags --quiet origin - orig_tag="$(git describe)" - - git checkout main - git pull --ff-only - - new_tag="$(git describe --abbrev=0)" - - if [ "$new_tag" != "$orig_tag" ]; then - git reset --hard "$new_tag" - cd .. - git add tz - tz_branch="update-tz-${new_tag}" - git checkout -b "$tz_branch" - git config user.name "Brandon W Maister" - git config user.email "quodlibetor@gmail.com" - msg="Update tz $orig_tag -> $new_tag" - git commit -m "$msg" - git push -u origin "$tz_branch" - echo "::set-output name=did_update::yes" - echo "::set-env name=PULL_REQUEST_FROM_BRANCH::${tz_branch}" - echo "::set-env name=PULL_REQUEST_TITLE::$msg" - echo "::set-env name=PULL_REQUEST_BODY=''" - echo "::set-env name=PULL_REQUEST_REVIEWERS='quodlibetor djzin'" - else - echo "::set-output name=did_update::no" - fi -} - -main diff --git a/.github/workflows/update-tz.yml b/.github/workflows/update-tz.yml deleted file mode 100644 index 1250e64..0000000 --- a/.github/workflows/update-tz.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Update TZ submodule - -on: - schedule: - - cron: "0 0 * * *" - -jobs: - check-for-update: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Checkout and update submodules - id: update_tz - shell: sh - run: .github/bin/update-tz.sh - - name: Create Pull Request - uses: quodlibetor/pull-request-action@1.0.6-patch1 - if: ${{ steps.update_tz.outputs.did_update == 'yes' }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PULL_REQUEST_BRANCH: main - FAIL_ON_ERROR: 'yes'