Skip to content

Commit

Permalink
CONFIG: Trying out GITHUB PAT
Browse files Browse the repository at this point in the history
  • Loading branch information
UmairJibran authored May 19, 2023
1 parent e42b13f commit eb24123
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,26 @@ inputs:
description: 'Branch in which you want to merge the PR, defaults to alpha'
required: false
default: 'alpha'
token:
description: GitHub Personal Access Token
required: true
branding:
icon: 'activity'
color: 'white'

env:
TARGET_BRANCH: INPUTS_TARGET-BRANCH
GITHUB_PAT: INPUTS_TOKEN
runs:
using: "composite"
using: 'composite'
steps:
- run: |
git fetch
if ! git rev-parse --verify ${{ env.TARGET_BRANCH }} >/dev/null 2>&1; then
git checkout ${{ github.event.repository.default_branch }}
git pull
git branch ${{ env.TARGET_BRANCH }}
git remote set-url origin https://${{ env.GITHUB_PAT }}@github.com/${{ github.repository_owner }}/${{ github.repository }}.git
git push --set-upstream origin ${{ env.TARGET_BRANCH }}
fi
shell: bash
Expand All @@ -32,5 +37,5 @@ runs:
git checkout ${{ env.TARGET_BRANCH }}
git pull
git merge --no-ff origin/${{ github.event.pull_request.head.ref }} -m "Merge pull request into ${{ env.TARGET_BRANCH }}"
git push origin ${{ env.TARGET_BRANCH }}
shell: bash
git push origin ${{ env.TARGET_BRANCH }}
shell: bash

0 comments on commit eb24123

Please sign in to comment.