Skip to content

Commit 3ffb496

Browse files
committed
testing
1 parent c622eef commit 3ffb496

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ on:
2020
# * is a special character in YAML so you have to quote this string
2121
# Run this Github Action every Tuesday at 7 AM UTC
2222
- cron: '0 7 * * 2'
23+
pull_request:
24+
branches:
25+
- main
2326

2427
jobs:
2528
build:
@@ -29,12 +32,20 @@ jobs:
2932
steps:
3033
- name: Get current date
3134
id: date
32-
run: echo "::set-output name=current_date::$(date +'%Y-%m-%d')"
35+
run: echo "::set-output name=current_date::$(date +'%Y-%m-%d-%HH%MM%SS')"
36+
37+
- name: Sync fork
38+
run: gh repo sync $REPOSITORY -b $BRANCH_NAME
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
3341

3442
- name: Check out main branch
3543
uses: actions/checkout@v3
3644
with:
3745
ref: refs/heads/main
46+
repository: 'yoshi-code-bot/google-api-python-client'
47+
token: ${{secrets.YOSHI_CODE_BOT_TOKEN}}
48+
3849

3950
- name: Create branch
4051
run: |
@@ -68,7 +79,7 @@ jobs:
6879
working-directory: ./scripts
6980

7081
- name: Push changes
71-
run: git push -f --set-upstream origin update-discovery-artifacts-${{ steps.date.outputs.current_date }}
82+
run: git push update-discovery-artifacts-${{ steps.date.outputs.current_date }}
7283

7384
- name: Prepare summary for PR Body
7485
id: pr_body

0 commit comments

Comments
 (0)