We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c9b46a commit 75cccafCopy full SHA for 75cccaf
.github/workflows/cron_job.yml
@@ -0,0 +1,28 @@
1
+name: GitHub API Cronjob
2
+
3
+on:
4
+ schedule:
5
+ - cron: '* * * * *' # chạy mỗi phút
6
+ workflow_dispatch: # cho phép chạy thủ công
7
8
+jobs:
9
+ call-api:
10
+ runs-on: ubuntu-latest
11
12
+ steps:
13
+ - name: Run
14
+ run: echo "$(date) - Sending request to GitHub API"
15
16
+ - name: Gọi GitHub API
17
+ run: |
18
+ curl -L \
19
+ -H "Accept: application/vnd.github+json" \
20
+ -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN_API }}" \
21
+ -H "X-GitHub-Api-Version: 2022-11-28" \
22
+ https://api.github.com/orgs/masan-group/copilot/metrics
23
24
+ - name: Save file
25
+ uses: actions/upload-artifact@v4
26
+ with:
27
+ name: github-api-log
28
+ path: my_log.txt
0 commit comments