-
-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
temp: figure out how download-artifact works
- Loading branch information
Showing
2 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 | ||
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt | ||
|
||
name: "Try Download" | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
find-run: | ||
name: "Find latest dist run" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- name: "Find latest kit.yml run" | ||
id: runs | ||
uses: octokit/[email protected] | ||
with: | ||
route: GET /repos/nedbat/coveragepy/actions/workflows/kit.yml/runs | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
try-download: | ||
name: "Try to download artifacts" | ||
runs-on: "ubuntu-latest" | ||
needs: | ||
- find-run | ||
|
||
# https://api.github.com/repos/nedbat/coveragepy/actions/workflows/kit.yml/runs | ||
|
||
steps: | ||
|
||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- name: Dump job context | ||
env: | ||
JOB_CONTEXT: ${{ toJson(job) }} | ||
run: echo "$JOB_CONTEXT" | ||
- name: Dump steps context | ||
env: | ||
STEPS_CONTEXT: ${{ toJson(steps) }} | ||
run: echo "$STEPS_CONTEXT" | ||
|
||
#- name: "Find latest kit.yml run" | ||
# id: runs | ||
# uses: octokit/[email protected] | ||
# with: | ||
# route: GET /repos/nedbat/coveragepy/actions/workflows/kit.yml/runs | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: "Download dists" | ||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
with: | ||
repository: "nedbat/coveragepy" | ||
run-id: ${{ fromJson(steps.runs.outputs.data).workflow_runs[0].id }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
pattern: "dist-*" | ||
merge-multiple: true | ||
path: "dist/" | ||
|
||
- name: "What did we get?" | ||
run: | | ||
ls -alR | ||
echo "Number of dists:" | ||
ls -1 dist | wc -l |