diff --git a/.github/workflows/dependency-check.yml b/.github/workflows/dependency-check.yml index 36e2bc2..7a0b1be 100644 --- a/.github/workflows/dependency-check.yml +++ b/.github/workflows/dependency-check.yml @@ -225,7 +225,6 @@ jobs: if: steps.upgrade.outputs.has_updates == 'true' shell: bash run: >- - cd "${{ env.GITHUB_WORKSPACE }}" && tea login add -u "${{ github.server_url }}" -t "${{ secrets.GITHUB_TOKEN }}" @@ -234,15 +233,19 @@ jobs: if: steps.upgrade.outputs.has_updates == 'true' permissions: contents: write + working-directory: ${{ github.workspace }} run: | - cd "${{ github.workspace }}" - # Read the PR body from file - PR_BODY=$(cat "${{ github.workspace }}/pr-body.txt") + PR_BODY=$(cat pr-body.txt) - # Commit and push changes + # Configure git authentication git config user.name "Dependency Bot" git config user.email "bot@gitea.actions" + + # Set up authenticated remote URL + git remote set-url origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@${{ github.server_url }}/${{ github.repository }}" + + # Commit and push changes git checkout -b "deps/auto-upgrade-${{ github.run_number }}" git add Cargo.toml.liquid git commit -m "chore: upgrade dependencies"