Skip to content

Commit

Permalink
chore: try to use the GitHub API
Browse files Browse the repository at this point in the history
  • Loading branch information
vmx committed Aug 28, 2024
1 parent bd2dd66 commit bceba39
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 20 deletions.
61 changes: 42 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,26 +149,49 @@ jobs:
#


- name: Get proof parameters
uses: dawidd6/action-download-artifact@v6
#- name: Get proof parameters
# uses: dawidd6/action-download-artifact@v6
# with:
# workflow: proof-params.yml
# path: /var/tmp/filecoin-proof-parameters/
# #merge-multiple: true
# #github-token: ${{ github.token }}
# #repository: ${{ github.action_repository }}
# #run-id: ${{ github.event.workflow_run.id }}
# #github-token: ${{ secrets.GITHUB_TOKEN }}
# #github-token: ${{ github.token }}
# #run-id: ${{ github.event.workflow_run.id }}
#- name: Display structure of downloaded files
# run: ls -lR /var/tmp/filecoin-proof-parameters/
#- name: Move all artifacts from sub directories into the main one
# run: 'mv /var/tmp/filecoin-proof-parameters/*/* /var/tmp/filecoin-proof-parameters/'
#- name: Remove sub directories
# run: 'rmdir /var/tmp/filecoin-proof-parameters/* || true'
#- name: Display structure of downloaded files
# run: ls -lR /var/tmp/filecoin-proof-parameters/


- uses: octokit/[email protected]
id: latest-proof-params
with:
workflow: proof-params.yml
path: /var/tmp/filecoin-proof-parameters/
#merge-multiple: true
#github-token: ${{ github.token }}
#repository: ${{ github.action_repository }}
#run-id: ${{ github.event.workflow_run.id }}
#github-token: ${{ secrets.GITHUB_TOKEN }}
#github-token: ${{ github.token }}
#run-id: ${{ github.event.workflow_run.id }}
- name: Display structure of downloaded files
run: ls -lR /var/tmp/filecoin-proof-parameters/
- name: Move all artifacts from sub directories into the main one
run: 'mv /var/tmp/filecoin-proof-parameters/*/* /var/tmp/filecoin-proof-parameters/'
- name: Remove sub directories
run: 'rmdir /var/tmp/filecoin-proof-parameters/* || true'
- name: Display structure of downloaded files
run: ls -lR /var/tmp/filecoin-proof-parameters/
route: GET /repos/{owner}/{repo}/rust-fil-proofs/actions/workflows/proof-params.yml/runs
owner: filecoin-project
repo: rust-fil-proofs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: "echo latest proof params: '${{ steps.latest-proof-params.outputs.data }}'"

#- name: Download All Artifacts
# uses: actions/download-artifact@v4
# with:
# path: my-artifact
# pattern: my-artifact-*
# merge-multiple: true
# #repository: ${{ github.action_repository }}
# run-id: ${{ github.event.workflow_run.id }}
# #github-token: ${{ secrets.GITHUB_TOKEN }}
# #github-token: ${{ github.token }}



#- name: Test in release profile
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/proof-params.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Proof params

on: [pull_request, push]
#on: [pull_request, push]
on: pull_request

## Cancel a job if there's a new on on the same branch started.
## Based on https://stackoverflow.com/questions/58895283/stop-already-running-workflow-job-in-github-actions/67223051#67223051
Expand Down

0 comments on commit bceba39

Please sign in to comment.