Skip to content

Default token is not read automatically #21

Closed
@radeksimko

Description

@radeksimko

The Readme says

Support for actions/upload-artifact@v4 utilizes the GitHub REST API, and requires a permissive GITHUB_TOKEN ...

I'm assuming from GITHUB_TOKEN (environment variable) and from the current implementation that the token should be read automatically.

The most likely reason it is not however, is that the token is both required and has default set:

required: true
default: ${{ github.token }}

I ran into this recently in hashicorp/terraform-ls#1582

Even after adding the following to the workflow

permissions:
  actions: write

I was still getting the following error:

Error: Error: Parameter token or opts.auth is required

(which also happened to be ignored due to #20)

https://github.com/hashicorp/terraform-ls/actions/runs/7531206486/job/20499481014#step:2:9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions