Coder Social home page Coder Social logo

github-action-create-pr-parent-submodule's People

Contributors

kluu1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

github-action-create-pr-parent-submodule's Issues

Error : could not read Username for https://github.com/

Hi, this is my .yml and I already set my secrets.

name: Submodule Updates

#############################
# Start the job on all push #
#############################
on:
  push:
    branches-ignore: [master, main]
  pull_request:
    branches: [master, main]

###############
# Set the Job #
###############
jobs:
  build:
    name: Submodule update
    runs-on: ubuntu-latest
    env:
      PARENT_REPOSITORY: '<org>/repo-name'
      CHECKOUT_BRANCH: 'main'
      PR_AGAINST_BRANCH: 'main'
      OWNER: <org>

    steps:
      ##########################
      # Checkout the code base #
      ##########################
      - name: Checkout Code
        uses: actions/checkout@v2

      ####################################
      # Run the action against code base #
      ####################################
      - name: run action
        id: run_action
        uses: releasehub-com/github-action-create-pr-parent-submodule@v1
        with:
          github_token: ${{ secrets.RELEASE_HUB_SECRET }}
          parent_repository: ${{ env.PARENT_REPOSITORY }}
          checkout_branch: ${{ env.CHECKOUT_BRANCH}}
          pr_against_branch: ${{ env.PR_AGAINST_BRANCH }}
          owner: ${{ env.OWNER }}

And I get this error, any idea what's causing this?

Fetching the repository
/usr/bin/git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +refs/heads/:refs/remotes/origin/ +refs/tags/:refs/tags/
Error: fatal: could not read Username for 'https://github.com/': terminal prompts disabled
The process '/usr/bin/git' failed with exit code 128
Waiting 10 seconds before trying again

Action is depreciated warning message

I received the following warning when running this in my GH Action:

The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/github-script@v5. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

It appears you can fix this by updating three lines in the actions.yml:

Line 35: change to actions/checkout@v4
Line 54: change to actions/github-script@v6
Line 68: change to actions/github-script@v6

Action run ending "Error: Process completed with exit code 1."

Currently I do get an exit code 1. I'm not sure if my setup is somehow wrong and how I can further troubleshoot the following issue:

Run git config user.name github-actions
  git config user.name github-actions
  git config user.email [email protected]
  git submodule update --remote
  git checkout -b $GITHUB_RUN_ID
  git commit -am "updating submodules"
  git push --set-upstream origin $GITHUB_RUN_ID
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    PARENT_REPOSITORY: <org>/<repo>
    CHECKOUT_BRANCH: main
    PR_AGAINST_BRANCH: main
    OWNER: <org>
Switched to a new branch '2140478299'
On branch 2140478299
nothing to commit, working tree clean
Error: Process completed with exit code 1.

My action:

name: 'submodule update'
# When to start the job
on: 
  push:
    branches: [main]
  pull_request:
    branches: [main]
# Run the job
jobs:
  build:
    runs-on: ubuntu-latest
    env:
      PARENT_REPOSITORY: '<org>/<repo>'
      CHECKOUT_BRANCH: 'main'
      PR_AGAINST_BRANCH: 'main'
      OWNER: '<org>'
    steps:
    - name: checkout code
      uses: actions/checkout@v2
    - name: run action
      id: run_action
      uses: releasehub-com/github-action-create-pr-parent-submodule@v1
      with: 
        github_token: ${{ secrets.SUBMODULE_UPDATE_SECRET }}
        parent_repository: ${{ env.PARENT_REPOSITORY }}
        checkout_branch: ${{ env.CHECKOUT_BRANCH}}
        pr_against_branch: ${{ env.PR_AGAINST_BRANCH }}
        owner: ${{ env.OWNER }}

I've also walked again via the nice post at https://thenewstack.io/how-to-trigger-github-actions-on-submodule-updates/ but still not finding the root cause.

Many thanks.

Adding option to set reviewer

Hi,

It would be nice to be able to specify a reviewer to the made pull request, as it would notify the needed people.

Creating branch if branch doesn't exist

Hi,

Currently if the CHECKOUT_BRANCH doesn't exist, the workflow fail. However, a base branch (from which to create the checkout branch) could be specified so that the workflow doesn't fail. Is this something you could see fitting in this action?

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.