From 7d000d96cbf6768a2243f3ee8cfc9f1985272ce8 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Fri, 12 Jul 2024 16:00:24 -0400 Subject: [PATCH] remove the step to check for changes and push to branch --- .github/workflows/generate.yml | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 3ffd2bdcc..802efcc70 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -28,36 +28,12 @@ jobs: - name: Run update script ๐Ÿ”„ run: npm run update - - name: Check for changes and create branch ๐Ÿ“ค - id: check_changes - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - if [ -n "$(git status --porcelain)" ]; then - BRANCH_NAME="update-branch" - if git show-ref --verify --quiet "refs/heads/$BRANCH_NAME"; then - TIMESTAMP=$(date +%s) - BRANCH_NAME="${BRANCH_NAME}-${TIMESTAMP}" - fi - git checkout -b $BRANCH_NAME - git add db.json src/ - git commit -m "Automated update" - git push --force --set-upstream origin $BRANCH_NAME - echo "::set-output name=changes_detected::true" - echo "::set-output name=branch::$BRANCH_NAME" - else - echo "No changes detected." - echo "::set-output name=changes_detected::false" - echo "::set-output name=branch::$BRANCH_NAME" - fi - - - name: Create Pull Request ๐Ÿš€ + - name: Create Pull Request ๐Ÿš€ (if there are changes) if: steps.check_changes.outputs.changes_detected == 'true' uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ steps.check_changes.outputs.branch }} - base: master + branch: auto-update title: "๐Ÿค–Automated update" body: "This PR contains automated updates from running `npm run update`" labels: "automated update"