github-push-action: Missing input "github_token: ${{ secrets.GITHUB_TOKEN }}".

My repo: https://github.com/flutter-chat-dev/tic_tac_toe

Error: https://github.com/flutter-chat-dev/tic_tac_toe/actions/runs/5135214398/jobs/9240329007

Workflow:

name: Run layerlens.

on:
  push:
    branches: [ main]

jobs:
  generate_diagrams:
    runs-on: ubuntu-latest

    steps:
    - name: clone the repo
      uses: actions/checkout@v3

    - name: install Flutter sdk
      uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
      with:
        channel: 'stable'

    - name: version
      run: dart --version

    - name: dart pub get
      run: dart pub get

    - name: generate
      run: dart run layerlens

    - name: Commit files
      run: |
        echo ${{ github.ref }}
        git add .
        git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
        git config --local user.name "github-actions[bot]"
        git commit -m "CI: Automated layerlens push" -a | exit 0

    - name: Push changes
      if: github.ref == 'refs/heads/main'
      uses: ad-m/github-push-action@df39337088a4cf2782a73f221bbd33f90e3e091d
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}

Will appreciate help!!!

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 2
  • Comments: 21

Most upvoted comments

https://github.com/ansforge/IG-documentation/actions/runs/5455795460

Hi~ I also meets this error, after I try to add PAT token when checkout, the push action is works well.

- uses: actions/checkout@v3
  with:
    ref: main
    token : ${{ secrets.PAT }}

and also i tried without setting PAT token in actions/checkout@v3 the ad-m/github-push-action@master action also will be failed with above error. @ZPascal this might be the root cause of the problem, might consider adding it to README.md

Hi @nriss,

it’s necessary that you’ve specified the corresponding custom token inside triggered workflow file or forward it to the other action inside the other repository. The default token ${{ secrets.GITHUB_TOKEN }} can only be used inside the triggered repository.

It’s in general necessary that you set up an custom personal access token and specify it as described in the following code sample or forward it to the executed GH Action at the end.

    - name: Push changes
      if: github.ref == 'refs/heads/main'
      uses: ad-m/github-push-action@master
      with:
        github_token: ${{ secrets.PAT }}

@polina-c Sure, I’ll adjust the documentation as a follow-up.