Skip to content

Commit

Permalink
Update download.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
agahkarakuzu authored Dec 13, 2024
1 parent 0e9c14e commit 53539a1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,22 @@ jobs:
const repoUrl = process.env.repository_url;
const repoOwner = repoUrl.replace('https://github.com/', '');
const isAuthorized = "${{ steps.check-authorization.outputs.authorized }}" === "true";
const message = isAuthorized ? `Downloading data for ${repoOwner}` : "You are not authorized to perform this action.";
const message = isAuthorized ? `Pinging roboneuro to download the data for ${repoOwner}` : "You are not authorized to perform this action.";
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: message
});
- name: Cache Data
if: steps.comment-download.outputs.proceed == 'true'
run: |
curl -X POST https://preview.neurolibre.org/api/data/cache \
-u "${{ secrets.PREVIEW_API_USERNAME }}:${{ secrets.PREVIEW_API_PASSWORD }}" \
-H "Content-Type: application/json" \
-d '{
"id": "'${{ github.event.issue.number }}'",
"repository_url": "'${{ env.repository_url }}'",
"external_repo": "'${{ github.repository }}'"
}'

0 comments on commit 53539a1

Please sign in to comment.