[英]Github actions - How to Download the workflow logs using Github API?
我正在嘗試在工作流程完成后獲取構建日志。 我已經關注了這個文檔。 但我收到以下錯誤:
"message": "Not Found",
"documentation_url": "https://docs.github.com/rest"
我不知道我在這里做錯了什么。 有人指導我如何下載日志。
工作流.yml:
name: Get logs
on: push
jobs:
build:
runs-on: ubuntu-latest
name: get workflow logs
permissions:
actions: read
steps:
- name: Hello World
id: helloresponse
run: echo Hello, world!
- name: create log
if: always()
id: createlog
run: |
curl --request GET \
-H "Accept: application/vnd.github.v3+json" \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
https://api.github.com/repos/${{github.owner}}/${{github.repository}}/actions/runs/${{ github.run_id }}/log
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.