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 38c7e8e commit ad42e48
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/relinkedin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,18 @@ jobs:
}
shell: pwsh
- name: Load post ID.
uses: actions/download-artifact@v4
with:
run-id: ${{ env.RUN_ID }}
name: li_post_id.rds
path: li_post_id.rds
shell: pwsh
run: |
$headers = @{
"Authorization" = "Bearer ${{ secrets.GITHUB_TOKEN }}"
"Accept" = "application/vnd.github.v3+json"
}
$artifactId = $env:ARTIFACT_ID
$artifactUrl = "https://api.github.com/repos/rfordatascience/ttpost/actions/artifacts/$artifactId/zip"
Write-Host "Downloading artifact ID: $artifactId from URL: $artifactUrl"
Invoke-RestMethod -Uri $artifactUrl -Method Get -Headers $headers -OutFile "li_post_id.zip"
Write-Host "Artifact downloaded successfully to 'li_post_id.zip'. Listing contents:"
Expand-Archive -LiteralPath "li_post_id.zip" -DestinationPath "." -Force

0 comments on commit ad42e48

Please sign in to comment.