pixta-dev / repository-mirroring-action

A GitHub Action for mirroring a repository to another repository
https://github.com/marketplace/actions/mirroring-repository
MIT License
240 stars 82 forks source link

[Question] Bitbucket configuration #3

Closed joelpro2 closed 4 years ago

joelpro2 commented 4 years ago

I'm sorry cus i'm still very newbie with deployments.

How would you configure Bitbucket to accept the private ssh key to have writing access?

Here's my action

# Deploy to BitBucket repos

name: Deploy to BitBucket Wordpress Repositories

# You may pin to the exact commit or the version.
# uses: pixta-dev/repository-mirroring-action@02f1627ade9e6b3b69e6a6d4fe8bc997474f48d1
# uses: pixta-dev/repository-mirroring-action@v1
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  deploy_to_test_repo:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - uses: actions/checkout@v1
      - uses: pixta-dev/repository-mirroring-action@v1
        with:
          target_repo_url:
            git@bitbucket.org:username/reponame.git
          ssh_private_key:
            ${{ secrets.BITBUCKET_SSH_PRIVATE_KEY }}
joelpro2 commented 4 years ago

Made it by using my own user with the public key There's any chance to use it without binding it to a user?

yasaichi commented 4 years ago

@joelpro2 You could use access keys: https://support.atlassian.com/bitbucket-cloud/docs/add-access-keys/