Code Monkey home page Code Monkey logo

github-forks-sync-action's Introduction

GitHub Action to synchronise forks

Example Workflow file

jobs:
  update_external_airflow_fork:
    runs-on: ubuntu-latest
    steps:
      - uses: TobKed/github-forks-sync-action@master
        with:
          github_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
          upstream_repository: apache/airflow
          target_repository: TobKed/airflow
          upstream_branch: master
          target_branch: master
          force: true
          tags: true

Inputs

name value default description
github_token string Token for the repo. Can be passed in using ${{ secrets.GITHUB_TOKEN }}.
upstream_repository string Repository name. If you want to pull from private repository, you should make a personal access token and use it as the github_token input.
target_repository string Repository name. Default or empty repository name represents current github repository. If you want to push to other repository, you should make a personal access token and use it as the github_token input.
upstream_branch string 'master' Source branch from which changes will be pushed.
target_branch string 'master' Destination branch to push changes.
force boolean false Determines if force push is used.
tags boolean false Determines if --tags is used.

GitHub Token

GitHub Token is required to authenticate operations on the repository/repositories. It should be stored as a secret. To learn more about creating and using secrets check the official docs.

Pull from public repository and push to current repository

GitHub automatically creates a GITHUB_TOKEN secret to use in your workflow. You can use the GITHUB_TOKEN to authenticate in a workflow run. github_token input can be passed in as ${{ secrets.GITHUB_TOKEN }}. To learn more about this secret check the official docs.

Pull from private repository and/or push to other repository

Create Personal Access Token (PAT) with repo permissions and store it as a secret. Then it can be passed as in the example below:

github_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

To learn more about this creating PAT check the official docs.

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

No affiliation with GitHub Inc.

GitHub are registered trademarks of GitHub, Inc. GitHub name used in this project are for identification purposes only. The project is not associated in any way with GitHub Inc. and is not an official solution of GitHub Inc. It was made available in order to facilitate the use of the site GitHub.

github-forks-sync-action's People

Contributors

tnnd avatar tobked avatar turbaszek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.