Try permission
This commit is contained in:
parent
5c06517f13
commit
fa82826376
1 changed files with 10 additions and 6 deletions
|
|
@ -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"
|
||||
}' \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue