-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
[Feat]: file deletion #401
Comments
Hi @aairey thanks for the feature request. am not 100% sure if I completely understood the use case. So far I understood that you move a file within the source repository, within the target repository the new file will be present but the old file won't be removed. Is this correct? The synchronization process is currently related to the git history. This means in detail that the move need to be tracked within the source repository. Did you try to do a What might work for your workflow with a small change is the hooks ability https://github.com/AndreasAugustin/actions-template-sync?tab=readme-ov-file#lifecycle-hooks. |
I came to ask this same question. Just getting this set up and during testing I added a file called |
Hi @thatryan-di and thank you for your investigation. Will have a closer look into the issue soon. |
Hi @aairey and @thatryan-di . Sorry for late answer. As a default pull command
I will think about removing There was a discussion/issue in the past #316 related to removing |
Hi @aairey and @thatryan-di . Sorry for letting you wait. The issue is not super straight forward to solve. The command Need to do some final testing and the implementation also need to be done. |
Hi @aairey and @thatryan-di . I somehow have a solution. You can try it with name: actions-template-sync
on:
# cronjob trigger At 00:00 on day-of-month 1. https://crontab.guru/every-month
schedule:
- cron: "0 0 1 * *"
# manual trigger
workflow_dispatch:
jobs:
repo-sync:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
# To use this repository's private action, you must check out the repository
- name: Checkout
uses: actions/checkout@v4
- name: actions-template-sync
uses: AndreasAugustin/actions-template-sync@file_deletion
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_repo_path: <your_repo>
upstream_branch: main # defaults to main
# git_remote_pull_params: --allow-unrelated-histories --strategy=recursive -X theirs --squash
git_remote_pull_params: --allow-unrelated-histories --strategy=recursive --no-edit
is_force_deletion: true Please be aware that the Maybe you find some time to do some tests. Thanks 🚀 |
Describe the feature
Support deleting files that were previously managed, now template-sync leaves the prior fil in place.
Use Case
Moved from
.releaserc.json
to.releaserc.yaml
, the.releaserc.json
stays in place but we want to remove it.Proposed Solution
Optional delete option on the action?
Or delete by default (breaking change perhaps).
Acknowledgements
The text was updated successfully, but these errors were encountered: