https://github.com/socheatsok78/gickup-action
A GitHub Action for backing up any git repositories using gickup
https://github.com/socheatsok78/gickup-action
backup git
Last synced: 5 months ago
JSON representation
A GitHub Action for backing up any git repositories using gickup
- Host: GitHub
- URL: https://github.com/socheatsok78/gickup-action
- Owner: socheatsok78
- License: mit
- Created: 2025-01-02T09:50:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-10-01T09:23:49.000Z (10 months ago)
- Last Synced: 2026-01-14T01:37:21.651Z (7 months ago)
- Topics: backup, git
- Language: Shell
- Homepage: https://github.com/marketplace/actions/gickup-action
- Size: 51.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## About
A GitHub Action for backing up any git repositories using [gickup](https://github.com/cooperspencer/gickup).
## Usage
Create a new repository or use an existing one where you want to set up the backup action (e.g., `socheatsok78/.gickup`). This repository will hold your gickup configuration and the action workflow.
First, create a `.gickup/gickup.yml` file in that repository with your preferred configuration:
```yml
# yaml-language-server: $schema=https://raw.githubusercontent.com/cooperspencer/gickup/refs/heads/main/gickup_spec.json
# Example gickup configuration
source:
# Your source repository configuration goes here
destination:
# Your source repository configuration goes here
```
Please refer to the [gickup documentation](https://cooperspencer.github.io/gickup-documentation/category/configuration) for more information on how to configure your backup.
Then, create a `.github/workflows/gickup.yml` file in your repository with the following content:
```yml
name: gickup
on:
push:
workflow_dispatch:
jobs:
gickup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run gickup
uses: socheatsok78/gickup-action@v2
```
> [!NOTE]
> By default, the action will look for a `.gickup/gickup.yml` file in your repository. If you have a different configuration file, you can specify it using the `config` input. See the [Inputs](#inputs) section for more information.
## Inputs
- `config`: The path to the gickup configuration file. Default: `.gickup/gickup.yml`
- `dryrun`: Whether to run gickup in dry-run mode. Default: `false`
- `debug`: Whether to run gickup in debug mode. Default: `false`
## Accessing GitHub workflow `env`, `vars`, and `secrets`
You can access GitHub workflow `env`, `vars`, and `secrets` in your gickup configuration file by using the following syntax:
```yaml
# .gickup/gickup.yml
# Example gickup configuration with GitHub workflow env, vars, and secrets
source:
github:
- user: actions
token: ${{ .secrets.github_token }}
destination:
# Your destination repository configuration goes here
```
```yml
# .github/workflows/gickup.yml
# ...
jobs:
backup:
runs-on: ubuntu-latest
steps:
# ...
- name: Run gickup
uses: socheatsok78/gickup-action@v2
with:
# Add the following inputs to pass env, vars, and secrets
# to your gickup configuration
env: ${{ toJson(env) }}
vars: ${{ toJson(vars) }}
secrets: ${{ toJson(secrets) }}
```
The `env`, `vars`, and `secrets` inputs are optional. If you do not provide them, the action will not pass any environment variables, variables, or secrets to your gickup configuration. Thanks to [gomplate](https://github.com/hairyhenderson/gomplate) for providing the templating capabilities to access these values.
## License
This project is licensed under the [MIT License](LICENSE).