Skip to content

Debug why the gh api rate limit gets exceeded in the real workflow #48

Debug why the gh api rate limit gets exceeded in the real workflow

Debug why the gh api rate limit gets exceeded in the real workflow #48

Workflow file for this run

name: Artifacts
on:
push:
branches: [ trying-download-artifact ]
jobs:
download_curl_api_url:
runs-on: ubuntu-latest
env:
# permissions: write-all
# Both with and without permissions, I get a 401 with $GITHUB_TOKEN. Use own token instead. Probable problem: Can't give GITHUB_TOKEN permissions in repo scope.
steps:
- name: Run curl
run: |
curl -LOs -H "Authorization: Bearer ${{ secrets.FUZZY_CI_TOKEN }}" https://api.github.com/repos/pitag-ha/merlin/actions/artifacts/1043780208/zip -D headers.txt
- name: Print return headers
run: cat headers.txt
- name: Ls
run: ls
- name: Try unzip
run: unzip zip || cat zip
cat

Check failure on line 27 in .github/workflows/artifacts.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/artifacts.yml

Invalid workflow file

You have an error in your yaml syntax on line 27
# download_curl_manual_url:
# runs-on: ubuntu-latest
# permissions: write-all
# steps:
# - name: Run curl
# run: |
# curl -LO -H "Authorization: Bearer $GITHUB_TOKEN" https://github.com/pitag-ha/merlin/suites/18108450661/artifacts/1043818399
# - name: Ls
# run: ls
# - name: cat
# run: cat 1043818399
# upload:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Generate artifact
# run: echo "Hello, World!" > artifact.txt
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: artifact-${{ github.run_number }}
# path: artifact.txt
# download:
# # if: github.event.action == "labelled"
# runs-on: ubuntu-latest
# needs: upload
# permissions: write-all
# steps:
# - name: Sleep
# run: sleep 60
# - name: Download artifact
# uses: dawidd6/action-download-artifact@v2
# with:
# workflow: ${{ github.event.workflow_run.workflow_id }}
# search_artifacts: true
# check_artifacts: true
# - name: Display artifacts
# run: ls artifacts