Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThejasNU/Github action to merge master to target branch #67

Closed
wants to merge 1 commit into from

Conversation

ThejasNU
Copy link
Collaborator

No description provided.

@ThejasNU ThejasNU self-assigned this Jan 30, 2025
@ThejasNU ThejasNU added the wip This pr is work in progress label Jan 30, 2025
Comment on lines +10 to +36
runs-on: ubuntu-latest

steps:
# Checkout the master branch and target branch
- name: Checkout master branch
uses: actions/checkout@v2
with:
ref: master

- name: Checkout target branch
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.target_branch }} # Use input variable for target branch
path: target-branch

# Merge master into the target branch
- name: Merge master into target branch
run: |
git fetch origin
git checkout ${{ github.event.inputs.target_branch }}
git merge origin/master --no-ff --commit -m "Merging master into ${{ github.event.inputs.target_branch }}"

# Push the changes back to the target branch
- name: Push changes to target branch
run: |
git push origin ${{ github.event.inputs.target_branch }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
@ThejasNU ThejasNU closed this Jan 30, 2025
@ThejasNU ThejasNU deleted the ThejasNU/Merge-master-to-target-branch branch January 30, 2025 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip This pr is work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant