Try permission

This commit is contained in:
pazpi 2026-01-08 14:30:45 +01:00
parent 5c06517f13
commit fa82826376

View file

@ -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 }}
run: |
echo "Testing API endpoint..."
curl -v -X POST \
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"
}' \