bitbucket_push #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync from Bitbucket | |
on: | |
push: | |
branches: | |
- master | |
repository_dispatch: | |
types: [bitbucket_push] | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone from Bitbucket | |
run: | | |
git clone https://${{ secrets.BITBUCKET_USERNAME }}:${{ secrets.BITBUCKET_TOKEN }}@bitbucket.org/ciandt_it/devops-test.git . | |
env: | |
BITBUCKET_TOKEN: ${{ secrets.BITBUCKET_TOKEN }} | |
BITBUCKET_USERNAME: ${{ secrets.BITBUCKET_USERNAME }} | |
- name: Sync to GitHub | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
git remote add github https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/ciandt-china-dev/test_devops.git | |
git push github master --force |