Skip to content

Commit

Permalink
Update relinkedin.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jonthegeek authored Apr 16, 2024
1 parent a4b4e3f commit 4a168bd
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/relinkedin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,19 @@ jobs:
Write-Output "Artifacts available:"
$response.artifacts | ForEach-Object {
Write-Output "Artifact Name: $($_.name), Artifact ID: $($_.id)"
echo "ARTIFACT_ID=$($_.id)" | Out-File -FilePath $env:GITHUB_ENV -Append
}
shell: pwsh
- name: Make a directory for the artifact(s)
- Download artifact using API
shell: pwsh
run: mkdir artifacts
- name: Load post ID.
uses: actions/download-artifact@v4
with:
run-id: ${{ env.RUN_ID }}
path: artifacts
run: |
$headers = @{
"Authorization" = "Bearer ${{ secrets.GITHUB_TOKEN }}"
}
$artifactUrl = "https://api.github.com/repos/rfordatascience/ttpost/actions/artifacts/1418581898/zip"
Invoke-RestMethod -Uri $artifactUrl -Method Get -Headers $headers -OutFile "artifact.zip"
Write-Host "Artifact downloaded successfully. Listing contents:"
Get-ChildItem -Path .
- name: List directory contents
shell: pwsh
run: ls -R artifacts
run: ls

0 comments on commit 4a168bd

Please sign in to comment.