https://github.com/kafkasl/delete_from_another_repo
Github action to delete path from another repository
https://github.com/kafkasl/delete_from_another_repo
Last synced: about 2 months ago
JSON representation
Github action to delete path from another repository
- Host: GitHub
- URL: https://github.com/kafkasl/delete_from_another_repo
- Owner: kafkasl
- License: apache-2.0
- Created: 2022-06-22T08:16:06.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-22T08:51:15.000Z (almost 3 years ago)
- Last Synced: 2025-03-15T14:16:03.437Z (2 months ago)
- Language: Shell
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# delete_from_another_repo_action
This GitHub Action removes a path from a remote repository# Example Workflow
name: Remove Pathon: push
jobs:
remove-path:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3- name: Remove test api.code-workspace file
uses: kafkasl/delete_from_another_repo@master
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
path: 'api.code-workspace'
destination_repo: 'kafkasl/api'
user_email: '[email protected]'
user_name: 'dmnemec'
commit_message: 'A custom message for the commit'# Variables
The `API_TOKEN_GITHUB` needs to be set in the `Secrets` section of your repository options. You can retrieve the `API_TOKEN_GITHUB` [here](https://github.com/settings/tokens) (set the `repo` permissions).
* path: The file or directory to be removed.
* destination_repo: The repository to place the file or directory in.
* user_email: The GitHub user email associated with the API token secret.
* user_name: The GitHub username associated with the API token secret.
* destination_branch: [optional] The branch of the source repo to update, if not "main" branch is used.
* destination_branch_create: [optional] A branch to be created with this commit, defaults to commiting in `destination_branch`
* commit_message: [optional] A custom commit message for the commit. Defaults to `Update from https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}`