VIDCS-3303: Improve .env config documentation and example #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto-set Base Branch to Develop | |
on: | |
pull_request: | |
types: [opened] | |
permissions: | |
contents: read | |
jobs: | |
set-base-branch: | |
runs-on: ubuntu-22.04 | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Check and Update Base Branch | |
run: | | |
TARGET_BRANCH="${{ github.event.pull_request.base.ref }}" | |
BASE_BRANCH="${{ github.event.pull_request.head.ref }}" | |
if [ "$TARGET_BRANCH" = "main" ] && [ "$BASE_BRANCH" != "develop" ]; then | |
echo "Switching base branch from $TARGET_BRANCH to develop..." | |
gh pr edit "${{ github.event.pull_request.number }}" --base "develop" | |
echo "Base branch updated to 'develop'." | |
else | |
echo "No changes needed: Target branch is '$TARGET_BRANCH' and base branch is '$BASE_BRANCH'." | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |