Coder Social home page Coder Social logo

lelia / copy-to-another-repository Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sator-imaging/copy-to-another-repository

0.0 0.0 0.0 134 KB

GitHub Actions to copy selected file to another repository and create Pull Request (PR).

License: MIT License

copy-to-another-repository's Introduction

GitHub Actions: Copy to Another Repository

Copy-to-Another-Repository is reusable workflow to copy selected file to another repository and create Pull Request (PR) to merge.

Usage

Create GitHub Actions like as follows. See action.yml for further details.

name: GitHub-Actions-Name

on:
  workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
  push:
    branches: [ main ]
    branches-ignore:
    tags:
    tags-ignore:
    paths:
      - 'README.md'  # limit trigger to the target-filepath.
                     # It's not elegant to set same value in two options but
                     # there is no way to retrieve this value in composite action.

jobs:
  main:
    runs-on: ubuntu-latest
    steps:
      - uses: sator-imaging/Copy-to-Another-Repository@v1
        with:

          # required parameters
          target-filepath: 'README.md'      # file path to copy
          output-branch: 'main or master'   # branch name to create pull request
          output-repo: 'Owner/AnotherRepository'
          git-token: ${{ secrets.TOKEN_TO_ACCESS_OUTPUT_REPO }}
          
          # optional parameters and default values
          commit-message-prefix: '[actions] '   # followed by source repository and file name
          output-directory: "${{ github.event.repository.name }}"   # copy file into sub directory
          pr-branch-prefix: "actions/${{ github.event.repository.name }}"   # branch name prefix followed by date and time
          pr-title: "GitHub Actions: ${{ github.event.repository.name }}"   # followed by source repository and file name
          pr-message: "${{ github.workflow }} on ${{ github.server_url }}/${{ github.repository }}"   # followed by action repository
          git-name: "github-actions[bot]"   # your name can be set by ${{ github.actor }}
          git-email: 'github-actions[bot]@users.noreply.github.com'   # associated user icon is shown in commit page

# {% endraw %}

Learning Resources

Copyright

Copyright © 2022 Sator Imaging, all rights reserved.

copy-to-another-repository's People

Contributors

sator-imaging 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.