Skip to content

Commit

Permalink
CONFIG :move repo checking to top
Browse files Browse the repository at this point in the history
  • Loading branch information
UmairJibran committed May 24, 2023
1 parent dea0e1e commit 1b74883
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ runs:

- id: merge-branch
run: |
echo "DECLARING DEFAULT BRANCH"
BRANCH=${{ github.event.repository.default_branch }}
if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
echo "GIT REPO NOT FOUND, PLEASE USE /`actions/checkout@latest/`"
echo "GIT REPO NOT FOUND, PLEASE USE \`actions/checkout@latest\`"
exit 1
fi
echo "DECLARING DEFAULT BRANCH"
BRANCH=${{ github.event.repository.default_branch }}
git fetch
if ! git ls-remote --exit-code --heads origin ${{ env.TARGET_BRANCH }} >/dev/null 2>&1; then
echo "CHECKING OUT \`$BRANCH\`"
Expand Down

0 comments on commit 1b74883

Please sign in to comment.