Skip to content

Commit

Permalink
Build Finish Notify Setting
Browse files Browse the repository at this point in the history
  • Loading branch information
youkura-ikuzee committed Nov 28, 2023
1 parent bfcd207 commit f9a9f21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

headers = {
"Accept": "application/vnd.github.v3+json",
"Authorization": os.getenv("PERSONAL_ACCESS_TOKEN"),
"Authorization": os.getenv("GITHUB_TOKEN"),
}

req = requests.get(f" https://api.github.com/repos/{os.getenv('GITHUB_REPOSITORY')}/actions/artifacts",
res = requests.get(f" https://api.github.com/repos/{os.getenv('GITHUB_REPOSITORY')}/actions/artifacts",
headers=headers).json()


Expand All @@ -32,4 +32,4 @@ def message(url):
return content


requests.post(os.getenv("DISCORD_WEBHOOK_URL"), message(get_download_url(req)))
requests.post(os.getenv("DISCORD_WEBHOOK_URL"), message(get_download_url(res)))
2 changes: 1 addition & 1 deletion .github/workflows/build_finish_notify.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: 'GitHub Build Finish Notification'

env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}

on:
Expand All @@ -27,5 +26,6 @@ jobs:
- name: send download artifact page url
env:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python .github/send_download_artifact_url/send-download-artifact-page-url.py

0 comments on commit f9a9f21

Please sign in to comment.