-
Notifications
You must be signed in to change notification settings - Fork 17
/
action.yml
39 lines (37 loc) · 1.42 KB
/
action.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
38
39
name: "Merge Upstream"
description: "Merge changes from the uppstream repo you had forked from."
author: "eXions"
branding:
icon: git-merge
color: black
inputs:
upstream:
description: 'Upstream repository owner/name. For example, exions/merge-upstream'
required: true
upstream-branch:
description: 'Upstream branch to merge from. For example, master'
default: 'master'
branch:
description: 'Branch to merge to. For example, master'
default: 'master'
token:
description: >
Personal access token (PAT) used to fetch the repository. The PAT is configured
with the local git config, which enables your scripts to run authenticated git
commands. The post-job step removes the PAT.
We recommend using a service account with the least permissions necessary.
Also when generating a new PAT, select the least scopes necessary.
[Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
default: ${{ github.token }}
runs:
using: "composite"
steps:
- run: |
git remote add -f upstream "https://github.com/${{ inputs.upstream }}.git"
git remote -v
git branch --all
git config --list
git checkout ${{ inputs.branch }}
git merge --ff-only upstream/${{ inputs.upstream-branch }}
git push
shell: bash