forked from pepite/lunatech-blog-engine
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (33 loc) · 1016 Bytes
/
deploy_template.yaml
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
name: Deploy Template
on:
workflow_call:
inputs:
source_branch:
type: string
required: true
description: Source Branch
target_branch:
type: string
required: true
description: Target Branch
jobs:
deploy:
name: Deploy ${{ inputs.target_branch }}
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
name: Generate GitHub Token
id: app-token
with:
app-id: ${{ secrets.LUNATECH_BLOG_APP_ID }}
private-key: ${{ secrets.LUNATECH_BLOG_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: '0'
- name: Merge from ${{ inputs.source_branch }} to ${{ inputs.target_branch }}
run: |
git fetch origin
git checkout ${{ inputs.target_branch }}
git rebase origin/${{ inputs.source_branch }}
git push origin ${{ inputs.target_branch }}