forked from Adventech/sabbath-school-lessons
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 1.24 KB
/
sync-stage-into-master.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: sync-stage-into-master
on:
workflow_dispatch:
schedule:
- cron: '0 1,7 * * *'
jobs:
sync-stage-into-master:
if: (github.repository == 'Adventech/sabbath-school-lessons' && github.ref_name == 'stage')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: stage
fetch-depth: 0
persist-credentials: false
github_token: ${{ secrets.PERSONAL_GH_TOKEN }}
- uses: actions/setup-node@v2
with:
node-version: '16'
check-latest: true
- name: Add token for private packages
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.PACKAGES_SECRET }}" >> .npmrc
- run: npm install
- run: node verify.js
- name: Get Status of current ref
id: get-status
uses: danieldeichfuss/[email protected]
with:
ref: ${{ github.sha }}
- name: Merge stage -> master
if: ${{steps.get-status.outputs.all-checks-completed == 'true' && steps.get-status.outputs.all-checks-passed == 'true'}}
uses: devmasx/merge-branch@master
with:
type: now
from_branch: stage
target_branch: master
github_token: ${{ secrets.PERSONAL_GH_TOKEN }}