Skip to content

Commit ef2c759

Browse files
authoredOct 5, 2020
Create copy-branch.yml
1 parent 1630f6b commit ef2c759

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
 

‎.github/workflows/copy-branch.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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

0 commit comments

Comments
 (0)
Please sign in to comment.