Skip to content

Commit 2ca1fe4

Browse files
Add GITHUB_TOKEN in docker buildx build command for custom flavor (#6545)
* fix(custom_flavor): Add GITHUB_TOKEN in docker build command for building custom flavor docker image Fix issue #6544 * Update CHANGELOG.md * fix(custom_flavor): Apply suggestion from Cursor Bugbot * Update build.py
1 parent ed58ede commit 2ca1fe4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.automation/build.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3597,11 +3597,14 @@ def build_custom_flavor(dockerfile):
35973597
)
35983598
command = [
35993599
"docker",
3600+
"buildx",
36003601
"build",
36013602
"-t",
36023603
tag_id,
36033604
"-f",
36043605
dockerfile,
3606+
"--secret",
3607+
"id=GITHUB_TOKEN",
36053608
work_dir,
36063609
]
36073610
logging.info("Running command: " + " ".join(command))

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
2323
- Install dotenv-linter deterministically, by @bdovaz in <https://github.com/oxsecurity/megalinter/pull/6385>
2424

2525
- Fixes
26+
- [#6544](https://github.com/oxsecurity/megalinter/issues/6544): Add GITHUB_TOKEN in docker build command for custom flavor
2627

2728
- Reporters
2829

0 commit comments

Comments
 (0)