Skip to content

Custom Flavor builds fail due to missing GITHUB_TOKEN #6544

@davidfevre-gouv-nc

Description

@davidfevre-gouv-nc

Describe the bug
In the file

command = [
, the GITHUB_TOKEN secret is missing in the docker build command.

Consequently, when I try to make a custom flavor including JAVA_CHECKSTYLE linter I have the following error:

[stage-13 22/34] RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s     -H "Accept: application/vnd.github+json"     -H "Authorization: *** /run/secrets/GITHUB_TOKEN)"     https://api.github.com/repos/checkstyle/checkstyle/releases/latest         | grep browser_download_url         | grep ".jar"         | cut -d '"' -f 4)     && curl --retry 5 --retry-delay 5 -sSL $CHECKSTYLE_LATEST         --output /usr/bin/checkstyle:
0.150 cat: can't open '/run/secrets/GITHUB_TOKEN': No such file or directory

To Reproduce
Make a custom flavor including JAVA_CHECKSTYLE.

Resource: https://megalinter.io/beta/custom-flavors/#create-a-custom-flavor

Expected behavior
No error when creating a custom flavor including JAVA_CHECKSTYLE.

Screenshots
None.

Additional context
None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions