From 827dd1f4483b790560dbe9638b9a0f0b68df5b33 Mon Sep 17 00:00:00 2001 From: Vicky Bikia Date: Mon, 3 Jun 2024 11:39:34 -0700 Subject: [PATCH] Remove update_authors workflow --- .github/workflows/update-authors.yml | 75 ---------------------------- 1 file changed, 75 deletions(-) delete mode 100644 .github/workflows/update-authors.yml diff --git a/.github/workflows/update-authors.yml b/.github/workflows/update-authors.yml deleted file mode 100644 index 1f0af10..0000000 --- a/.github/workflows/update-authors.yml +++ /dev/null @@ -1,75 +0,0 @@ -# -# This source file is part of the Stanford Spezi open-source project -# -# SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md) -# -# SPDX-License-Identifier: MIT -# - -name: Update Authors - -on: - push: - tags: - - '*' - -jobs: - update_authors: - name: Update Authors - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.10.9" - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install toml - - - name: Install jq - run: sudo apt-get install -y jq - - - name: Update authors in pyproject.toml - run: python update_authors.py - - - name: Determine branch name - id: get_branch - run: | - if [[ "${GITHUB_REF}" == refs/pull/*/merge ]]; then - echo "Branch is a pull request merge ref" - BRANCH_NAME=$(jq -r '.pull_request.head.ref' "$GITHUB_EVENT_PATH") - echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV - else - echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV - fi - - - name: Stash changes - run: git stash - - - name: Pull remote changes - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH_NAME: ${{ env.BRANCH_NAME }} - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git - git pull origin $BRANCH_NAME --allow-unrelated-histories - - - name: Apply stashed changes - run: git stash pop - - - name: Commit and push changes - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH_NAME: ${{ env.BRANCH_NAME }} - run: | - git add pyproject.toml - git commit -m "Update authors from CONTRIBUTORS.md" || echo "No changes to commit" - git push origin HEAD:$BRANCH_NAME