sync:
runs-on: ubuntu-latest
steps:
- - uses: dawidd6/action-download-artifact@v2
+ - uses: actions/github-script@v5
with:
- workflow: pages/pages-build-deployment
- workflow_conclusion: success
- name: github-pages
- - run: tar tf artifact.tar
+ script: |
+ const artifact_id = await github.rest.actions.listWorkflowRunArtifacts({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ run_id: context.payload.workflow_run.id,
+ per_page: 1,
+ });
+ const artifact = await github.rest.actions.downloadArtifact({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ artifact_id: artifact_id.data.artifacts[0].id,
+ archive_format: "zip",
+ });
+ console.log(artifact_url);
+ github.exec.exec("tar xz", [], {
+ input: artifact.data
+ });
+ - run: ls -al