Skip to content

Commit

Permalink
Grants 'actions: read' to Update PR Actions (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
ultimaweapon authored Feb 25, 2024
1 parent 31d8465 commit 9b743a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pr-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
name: Update PR
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
permissions:
actions: read
steps:
- name: Install Python modules
run: pip install PyGithub
Expand All @@ -19,10 +21,9 @@ jobs:
from urllib.request import urlopen
from zipfile import ZipFile
event = json.loads('''${{ toJSON(github.event.workflow_run) }}''')
gh = Github(auth=Auth.Token("${{ secrets.GITHUB_TOKEN }}"))
repo = gh.get_repo("${{ github.repository }}")
run = repo.get_workflow_run(event["id"])
run = repo.get_workflow_run(${{ github.event.workflow_run.id }})
info = None
for artifact in run.get_artifacts():
Expand Down

0 comments on commit 9b743a1

Please sign in to comment.