Skip to content

Commit

Permalink
Reduce amount of testing so I don't hit API rate limits
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-unlikelyai committed Feb 12, 2023
1 parent dd1c10d commit 8ba9d19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 43 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/download.yml
Expand Up @@ -140,49 +140,6 @@ jobs:
dry_run: true
- name: Test
run: test ${{ steps.download.outputs.dry_run }} == false
download-many:
runs-on: ubuntu-latest
needs: wait
strategy:
# Use a matrix to run this job 40 times with 40 different artifacts. This catches any pagination issues (as GH's default page size is 30)
matrix:
run-number: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup outputs
id: setup
run: echo "artifact-name=${{ format('artifact{0}', matrix.run-number) }}" >> $GITHUB_OUTPUT
- name: Download
uses: ./
with:
workflow: upload.yml
name: ${{ steps.setup.outputs.artifact-name }}
path: ${{ steps.setup.outputs.artifact-name }}
- name: Test
run: cat ${{ steps.setup.outputs.artifact-name }}/sha | grep $GITHUB_SHA
download-many-check-artifacts:
runs-on: ubuntu-latest
needs: wait
strategy:
# Use a matrix to run this job 40 times with 40 different artifacts. This catches any pagination issues (as GH's default page size is 30)
matrix:
run-number: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup outputs
id: setup
run: echo "artifact-name=${{ format('artifact{0}', matrix.run-number) }}" >> $GITHUB_OUTPUT
- name: Download
uses: ./
with:
workflow: upload.yml
name: ${{ steps.setup.outputs.artifact-name }}
path: ${{ steps.setup.outputs.artifact-name }}
check_artifacts: true
- name: Test
run: cat ${{ steps.setup.outputs.artifact-name }}/sha | grep $GITHUB_SHA
download-many-search-artifacts:
runs-on: ubuntu-latest
needs: wait
Expand Down
2 changes: 2 additions & 0 deletions main.js
Expand Up @@ -133,10 +133,12 @@ async function main() {
continue
}
if (searchArtifacts) {
core.info(`==> (found) Searching for artifacts`)
const artifact = artifacts.data.artifacts.find((artifact) => {
return artifact.name == name
})
if (!artifact) {
core.info(`==> Didn't find artifact - contuing`)
continue
}
}
Expand Down

0 comments on commit 8ba9d19

Please sign in to comment.