Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reload/git-push-mirror-action
Push your checkout to a git mirror (git push --mirror)
https://github.com/reload/git-push-mirror-action
actions git-mirror github-actions
Last synced: 12 days ago
JSON representation
Push your checkout to a git mirror (git push --mirror)
- Host: GitHub
- URL: https://github.com/reload/git-push-mirror-action
- Owner: reload
- License: mit
- Created: 2019-07-08T08:23:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T04:02:07.000Z (8 months ago)
- Last Synced: 2024-11-18T01:10:07.809Z (2 months ago)
- Topics: actions, git-mirror, github-actions
- Language: Dockerfile
- Homepage:
- Size: 59.6 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Push your checkout to a git mirror (git push --mirror)
This action can be used to push your checkout to a git mirror.
We use it to mirror the master branch to a BitBucket repository.
**Notice:** The action will do a `git push --mirror `. This will
delete all remote branches not known to the local (that is the
checkout done by the action) checkout. So potentially dangerous if you
mess up the checkout.This is the workflow file we use:
```yaml
on:
push:
branches:
- master
name: Push to Bitbucket
jobs:
push_to_bitbucket:
name: Push to Bitbucket
if: "!github.event.deleted"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2-beta
with:
fetch-depth: 0 # Zero indicates all history
ref: master
- name: Push to mirror
uses: reload/git-push-mirror-action@master
with:
args: https://${{ secrets.BITBUCKET_USER }}:${{ secrets.BITBUCKET_APP_PASSWORD }}@bitbucket.org/foo/bar.git
```