diff --git a/.forgejo/workflows/auto-update-pr.yaml b/.forgejo/workflows/auto-update-pr.yaml index 203f85e..33c7a0b 100644 --- a/.forgejo/workflows/auto-update-pr.yaml +++ b/.forgejo/workflows/auto-update-pr.yaml @@ -6,6 +6,10 @@ on: - cron: '0 22 * * 5' workflow_dispatch: {} +permissions: + contents: write + pull-requests: write + jobs: create-pr: runs-on: nix @@ -54,18 +58,18 @@ jobs: echo "Repository: ${{ forgejo.repository }}" echo "Branch: ${{ steps.commit.outputs.branch_name }}" - - name: Test API endpoint + - name: Create Pull Request if: steps.changes.outputs.changed == 'true' env: - FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }} + FORGEJO_TOKEN : ${{ secrets.FORGEJO_TOKEN }} run: | - echo "Testing API endpoint..." - curl -v -X POST \ - -H "Authorization: token $FORGEJO_TOKEN" \ + echo "Creating PR..." + curl -X POST \ + -H "Authorization: token $FORGEJO_TOKEN " \ -H "Content-Type: application/json" \ -d '{ "title": "chore: weekly flake update", - "body": "Automated flake update from CI", + "body": "Automated flake update from CI.\n\nThis PR updates all flake inputs.", "head": "${{ steps.commit.outputs.branch_name }}", "base": "master" }' \