Skip to content

Raw Github Downloader

Actions

About

Download files from Github
v2.0.1
Latest
StarΒ (0)

πŸ“₯ GitHub Downloader Action

Easily download files from any public or private GitHub repository in your GitHub Actions workflows! πŸš€


✨ Features

  • πŸ”’ 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

πŸ“¦ Quick Start

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"

βš™οΈ Input Parameters

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",
}

πŸ“€ Output Parameters

Name Description
files JSON array of all downloaded file paths (for use in later steps)

🐞 Troubleshooting

  • 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.

❓ FAQ

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.


🀝 Contributing

Pull requests and issues are welcome! Please review the LICENSE before contributing.


πŸ“š Resources


πŸ“ License

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.

About

Download files from Github
v2.0.1
Latest

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.