A GitHub Action that installs restic and resticprofile binaries on the runner. This action downloads the specified versions of restic and resticprofile and makes them available in the PATH for use in your workflows.
- Downloads and installs restic and resticprofile binaries
- Configurable versions for both tools
- Optional installation of restic (enabled by default)
- Cross-platform support (Linux, macOS, Windows)
- Fast execution with minimal dependencies
Use this action in your workflow to set up restic and resticprofile before running backup operations.
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup restic and resticprofile
uses: axelerant/setup-resticprofile-action@v1
with:
restic-version: 'latest'
resticprofile-version: 'latest'
- name: Run restic backup
run: restic versionsteps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup restic and resticprofile
uses: axelerant/setup-resticprofile-action@v1
id: setup
with:
install-restic: true
restic-version: '0.16.4'
resticprofile-version: '0.27.0'
- name: Verify installation
run: |
echo "Restic installed: ${{ steps.setup.outputs.restic-installed }}"
echo "Resticprofile installed: ${{ steps.setup.outputs.resticprofile-installed }}"
restic version
resticprofile --version
- name: Run backup
run: resticprofile backup| Input | Description | Required | Default |
|---|---|---|---|
install-restic |
Whether to install restic | No | true |
restic-version |
Version of restic to install | No | latest |
resticprofile-version |
Version of resticprofile to install | No | latest |
| Output | Description |
|---|---|
restic-installed |
Whether restic was successfully installed |
resticprofile-installed |
Whether resticprofile was successfully installed |
You'll need to have a reasonably modern version of Node.js handy (24.x or later should work!).
-
Install dependencies
npm install
-
Package the TypeScript for distribution
npm run bundle
-
Run tests
npm test -
Format, lint, test, and build everything
npm run all
You can test the action locally using the
@github/local-action utility:
# Visual Studio Code Debugger
# Review and update .vscode/launch.json as needed
# Terminal/Command Prompt
npx @github/local-action . src/main.ts .envYou can provide a .env file to set environment variables for testing. See
.env.example for reference.
The action downloads the appropriate binaries for restic and resticprofile based
on the runner's operating system and architecture. The binaries are extracted to
/usr/local/bin (or the Windows equivalent) to make them available in the PATH.
The action supports:
- Linux (x86_64, aarch64)
- macOS (x86_64, arm64)
- Windows (x86_64)
- Create a feature branch from
main - Make your changes
- Add tests in
__tests__/directory - Run
npm run allto format, lint, test, and build - Create a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
This action follows semantic versioning. You can reference specific versions using tags:
uses: axelerant/[email protected]For the latest version, you can use:
uses: axelerant/setup-resticprofile-action@mainThis project includes a helper script at script/release to
streamline the release process. The script helps with:
- Creating properly formatted release tags
- Updating version numbers in package.json
- Pushing releases to GitHub
Before releasing, make sure to:
- Update the version in
package.json - Run
npm run allto ensure everything builds correctly - Test the action in a workflow
- Run the release script:
./script/release