Skip to content

JackTn/script_github_actions

Repository files navigation

github-action for repo file sync

workflow

  • get change files from source repo
  • get Tree from dest repo
  • delete file from dest repo by path
  • merge changes files and dest repo files
  • create all tree & create commit
  • create pr

use this action

  • use actions/checkout@v2 first
  • see action.yml in root directory that the parameter used
  • last below your .github/workflows folder add your action yml

debug locally & run github action locally

  • debug locally : create .env file in your root directory and set source parameter that src/main.ts by hand

  • npm run build then npm run start or press F5

  • debug github action locally: download docker before and npm install act -g then run act command to debug locally

  • npm run all then run act

notice: when you use act the github environment like tooken sould use truth

dependencies