File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Duplicates default main branch to the old master branch
2+
3+ name : Duplicates main to old master branch
4+
5+ # Controls when the action will run. Triggers the workflow on push or pull request
6+ # events but only for the main branch
7+ on :
8+ push :
9+ branches : [ main ]
10+
11+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+ jobs :
13+ # This workflow contains a single job called "copy-branch"
14+ copy-branch :
15+ # The type of runner that the job will run on
16+ runs-on : ubuntu-latest
17+
18+ # Steps represent a sequence of tasks that will be executed as part of the job
19+ steps :
20+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it,
21+ # but specifies master branch (old default).
22+ - uses : actions/checkout@v2
23+ with :
24+ fetch-depth : 0
25+ ref : master
26+
27+ - run : |
28+ git config user.name github-actions
29+ git config user.email github-actions@github.com
30+ git merge origin/main
31+ git push
You can’t perform that action at this time.
0 commit comments