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'
|
- cron: '0 22 * * 5'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-pr:
|
create-pr:
|
||||||
runs-on: nix
|
runs-on: nix
|
||||||
|
|
@ -54,18 +58,18 @@ jobs:
|
||||||
echo "Repository: ${{ forgejo.repository }}"
|
echo "Repository: ${{ forgejo.repository }}"
|
||||||
echo "Branch: ${{ steps.commit.outputs.branch_name }}"
|
echo "Branch: ${{ steps.commit.outputs.branch_name }}"
|
||||||
|
|
||||||
- name: Test API endpoint
|
- name: Create Pull Request
|
||||||
if: steps.changes.outputs.changed == 'true'
|
if: steps.changes.outputs.changed == 'true'
|
||||||
env:
|
env:
|
||||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
FORGEJO_TOKEN : ${{ secrets.FORGEJO_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
echo "Testing API endpoint..."
|
echo "Creating PR..."
|
||||||
curl -v -X POST \
|
curl -X POST \
|
||||||
-H "Authorization: token $FORGEJO_TOKEN" \
|
-H "Authorization: token $FORGEJO_TOKEN " \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
"title": "chore: weekly flake update",
|
"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 }}",
|
"head": "${{ steps.commit.outputs.branch_name }}",
|
||||||
"base": "master"
|
"base": "master"
|
||||||
}' \
|
}' \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue