Raw Github Downloader
ActionsTags
Β (2)Easily download files from any public or private GitHub repository in your GitHub Actions workflows! π
- π Supports private repositories via Personal Access Token (PAT) or GITHUB_TOKEN
- π Download multiple files or folders in one step
- π·οΈ Specify branch, tag, or commit SHA for precise control
- ποΈ Map source files to custom destination paths using JSON
- π Generates a workflow summary table for all downloaded files
- π οΈ Simple setup and configuration
- π§© Integrates seamlessly with other actions
- πΌοΈ Visual summary in workflow logs
Add the action to your workflow YAML:
jobs:
download-files:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download files from repo
uses: AcmeSoftwareLLC/github-downloader@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
owner: AcmeSoftwareLLC
repo: example-repo
ref: develop
mappings: |
{
"src/config.json": "config/config.json",
"docs/manual.pdf": "documentation/manual.pdf"
}
output-directory: "downloads"| Name | Required | Description |
|---|---|---|
token |
β | GitHub Personal Access Token or GITHUB_TOKEN |
owner |
β | GitHub repository owner (e.g., octocat) |
repo |
β | Repository name (e.g., Hello-World) |
ref |
β | Branch, tag, or commit SHA (default: main) |
mappings |
β | JSON object mapping source files to destination paths |
output-directory |
β | Directory to save files (default: current directory) |
Example mappings:
{
"README.md": "docs/README.md",
"src/utils.ts": "lib/utils.ts",
}| Name | Description |
|---|---|
files |
JSON array of all downloaded file paths (for use in later steps) |
- Ensure your PAT or GITHUB_TOKEN has access to the target repository (repo/read permissions).
- Check that your mappings JSON is valid and paths exist in the source repo.
- Review workflow logs for error messages and summary table.
- If files are missing, verify the branch/tag/commit and file paths.
Q: Can I download from private repositories? A: Yes! Use a PAT or GITHUB_TOKEN with access to the target repo.
Q: Can I download folders? A: No, only individual files are supported.
Q: What happens if a file doesn't exist? A: The action will fail and report the missing file in the summary.
Q: Can I use this in composite actions? A: Yes, it works in any workflow step.
Pull requests and issues are welcome! Please review the LICENSE before contributing.
MIT Β© AcmeSoftwareLLC
Raw Github Downloader is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.