{"id":17912522,"url":"https://github.com/micalevisk/last-artifact-action","last_synced_at":"2026-04-30T01:34:08.397Z","repository":{"id":40717321,"uuid":"245730429","full_name":"micalevisk/last-artifact-action","owner":"micalevisk","description":"GitHub Action to download and read the last artifact uploaded on some GitHub repository.","archived":false,"fork":false,"pushed_at":"2024-04-04T14:43:10.000Z","size":2146,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T20:47:28.470Z","etag":null,"topics":["artifacts-repository","github-action","github-actions-artifacts","hacktoberfest","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/micalevisk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-08T01:01:42.000Z","updated_at":"2022-06-25T13:06:58.000Z","dependencies_parsed_at":"2023-12-30T19:25:56.891Z","dependency_job_id":"8b94e063-a3c7-440c-a52e-5196416c63a3","html_url":"https://github.com/micalevisk/last-artifact-action","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micalevisk%2Flast-artifact-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micalevisk%2Flast-artifact-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micalevisk%2Flast-artifact-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micalevisk%2Flast-artifact-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micalevisk","download_url":"https://codeload.github.com/micalevisk/last-artifact-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246952273,"owners_count":20859811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artifacts-repository","github-action","github-actions-artifacts","hacktoberfest","nodejs"],"created_at":"2024-10-28T19:45:42.477Z","updated_at":"2026-04-30T01:34:03.365Z","avatar_url":"https://github.com/micalevisk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# last-artifact-action\n\u003e inspired by https://github.com/actions/download-artifact/issues/3#issuecomment-579289919\n\nGet the content from a file of the last uploaded artifact on some GitHub repository.\n\n## Inputs\n\n### `repository`\nThe target GitHub owner and repository name  \ndefault: `${{ github.repository }}`\n\nYou should set `GITHUB_TOKEN` on either [`with:`](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepswith) or [`env:`](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#env) field (not both at same time) to prevent rate limiting.  \nIf `repository` is another private repo, you must define a [PAT with repo scope](https://github.com/settings/tokens/new?scopes=repo) and put this token on your secrets to be used as `GITHUB_TOKEN` value.\n\n## Outputs\n\n### `content`\nA serialized JSON where each key is the filename and the value its value as string  \nPS: maybe this won't work with non-text files; and every directory is ignored.\n\n### `loaded`\nThe string `'true'` if an artifact was found and loaded, `'false'` otherwise.\n\n## Usage\n\nMinimal example:\n\n```yml\nName: Foo\non: push\njobs:\n  run:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: micalevisk/last-artifact-action@v2\n        id: result\n      - if: steps.result.outputs.loaded == 'true'\n        run: echo \"${{ steps.result.outputs.content }}\"\n```\n\nExample using the action [`gr2m/get-json-paths-action`](https://github.com/gr2m/get-json-paths-action) to parses the JSON `content`:\n\n```yml\nName: Bar\non: push\njobs:\n  run:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Get 'world.txt' file content from last uploaded artifact\n      - uses: micalevisk/last-artifact-action@v2\n        id: result\n        with:\n          repository: owner/repo ## using another repo\n          GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n      - uses: gr2m/get-json-paths-action@v1.x\n        id: files\n        with:\n          json: \"${{ steps.result.outputs.content }}\"\n          world_file: \"world.txt\"\n      - if: steps.result.outputs.loaded == 'true'\n        run: echo \"${{ steps.files.outputs.word_file }}\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicalevisk%2Flast-artifact-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicalevisk%2Flast-artifact-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicalevisk%2Flast-artifact-action/lists"}