Skip to content

Possible to automagically use ${{ github.token }} ? #17

@jcbhmr

Description

@jcbhmr

Currently:

image

required: false
default: 'wiki/'
GH_TOKEN:
description: 'The GitHub Token for this action to use. Specify secrets.GITHUB_TOKEN.'
required: true
GH_MAIL:
description: 'The email associated with the token.'

But, I think you can make it magic so you don't need to specify the GH_TOKEN variable:

  GH_TOKEN:
    description: 'The GitHub Token for this action to use. Specify secrets.GITHUB_TOKEN.'
    required: true
    default: ${{ github.token }}
    # 🔺

I don't know 100% for sure, but I think this is possible. I think it's at least worth investigating though.

Here's what I know does work: https://github.com/jcbhmr/publish-wiki-action/blob/a9cd93ca56fd5ed2bf562abc26af3771fb8e63bd/action.yml

runs:
  using: composite
  steps:
    - id: gh-action
      run: '"${GITHUB_ACTION_PATH%/}/index.sh"'
      shell: bash
      # https://github.com/actions/runner/issues/665
      env:
        GITHUB_TOKEN: ${{ github.token }}
        INPUT_PATH: ${{ inputs.path }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds investigationMaintainer needs to check code and reproducequestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions