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 a year ago
  • Reactions: 1
  • Comments: 21

Most upvoted comments

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.