Skip to content

Instantly share code, notes, and snippets.

@jonico
Created June 21, 2021 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonico/526e9a368743f6ec2c6bb76dead6766b to your computer and use it in GitHub Desktop.
Save jonico/526e9a368743f6ec2c6bb76dead6766b to your computer and use it in GitHub Desktop.
Use actions-sync to sync actions/ org and some custom actions
#!/usr/bin/bash
cd
mkdir -p /tmp/actions
git clone https://github.com/github/platform-samples.git
sdk install groovy
cd platform-samples/api/groovy/
groovy ListReposInOrg.groovy -t $GH_PUBLIC actions > ~/repo-list
cd
wget https://github.com/actions/actions-sync/releases/download/v202009231612/gh_202009231612_linux_amd64.tar.gz
tar xvfz gh_202009231612_linux_amd64.tar.gz
cd bin/
./actions-sync --cache-dir=/tmp/actions pull --repo-name jonico/action-cats
./actions-sync --cache-dir=/tmp/actions pull --repo-name-list-file ~/repo-list
./actions-sync --cache-dir=/tmp/actions --destination-url "https://octodemo.com" --destination-token=$ACTIONS_SYNC push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment