Skip to content

Instantly share code, notes, and snippets.

@KyMidd

KyMidd/asdf.sh Secret

Created July 7, 2024 19:17
Show Gist options
  • Select an option

  • Save KyMidd/2930298a312514bf838706269295d2b7 to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/2930298a312514bf838706269295d2b7 to your computer and use it in GitHub Desktop.
# If local_testing = true, set vars
if [[ $local_testing == true ]]; then
# If running locally for tesing
GH_ORG="kymidd"
GH_REPO="TestingPRUpdater"
PR_TITLE="$PR_TITLE"
GITHUB_TOKEN="$GITHUB_TOKEN"
PULL_REQUEST_NUMBER=2
BASE_BRANCH="main"
else
# If running as an Action
GH_ORG="${{ github.repository_owner }}"
GH_REPO=$(echo ${{ github.repository }} | cut -d "/" -f 2)
PR_TITLE="${{ github.event.pull_request.title }}"
GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}"
PULL_REQUEST_NUMBER="${{ github.event.pull_request.number }}"
BASE_BRANCH="${{ github.event.pull_request.base.ref }}"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment