Deleting Files in Follower Branch
See original GitHub issueDeleting Files in Follower Branch
We have been using this action to keep main in sync with staging branch each night. This is working great for new and modified files.
Recently, we noticed that files deleted in the main branch are not deleted in the staging branch.
How can we ensure that files deleted in main are also deleted in staging?
Steps to reproduce
We are using the action as follows:
name: sync-changes-on-main-to-staging
on: [workflow_dispatch]
jobs:
sync-changes-on-main-to-staging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: staging
- name: Set Git Configs
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git fetch origin main:main
git merge main -X theirs --allow-unrelated-histories
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
title: "Merge main to staging"
branch: staging-promotion
delete-branch: true
token: ${{ secrets.PAT }}
Issue Analytics
- State:
- Created 9 months ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How to remove an updated file from a PR on GitHub - ffeathers
The instructions below assume that the unwanted updates are in a file that already exists in the GitHub repository. If the unwanted updates...
Read more >How do I delete a file from a Git repository?
Simply view any file in your repository, click the trash can icon at the top, and commit the removal just like any other...
Read more >Solved: How to delete a file at remote branch after I dele...
It will stage the deleted file, and followed by git commit and git push will remove the file from the repository. 2) (use...
Read more >Add or Remove Followers to a Record with the Help of ...
In Salesforce, a user can follow Chatter groups or Records. ... Add a Delete Records element to remove a follower from the account....
Read more >Deleting files in a repository
Browse to the directory in your repository that you want to delete. · In the top-right corner, click , then click Delete directory....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @peter-evans for your help this is working:
hmmm I get a different output on the github action