mirror of
https://github.com/docker/actions-toolkit.git
synced 2024-11-23 03:16:09 +08:00
buildx: use Buffer for base64 encoding of the Dockerfile
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
3543c64504
commit
e97959223c
@ -17,6 +17,9 @@
|
|||||||
frOM busybox as base
|
frOM busybox as base
|
||||||
cOpy lint.Dockerfile .
|
cOpy lint.Dockerfile .
|
||||||
|
|
||||||
|
# some special chars: distroless/python3-debian12のPythonは3.11
|
||||||
|
# https://github.com/docker/build-push-action/issues/1204#issuecomment-2274056016
|
||||||
|
|
||||||
from scratch
|
from scratch
|
||||||
MAINTAINER moby@example.com
|
MAINTAINER moby@example.com
|
||||||
COPy --from=base \
|
COPy --from=base \
|
||||||
|
@ -347,7 +347,7 @@ export class Buildx {
|
|||||||
if (Util.isPathRelativeTo(workspaceDir, ls.DockerfilePath)) {
|
if (Util.isPathRelativeTo(workspaceDir, ls.DockerfilePath)) {
|
||||||
dockerfiles.push({
|
dockerfiles.push({
|
||||||
path: path.relative(workspaceDir, ls.DockerfilePath),
|
path: path.relative(workspaceDir, ls.DockerfilePath),
|
||||||
content: btoa(fs.readFileSync(ls.DockerfilePath, {encoding: 'utf-8'}))
|
content: Buffer.from(fs.readFileSync(ls.DockerfilePath, {encoding: 'utf-8'}), 'utf-8').toString('base64')
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
core.debug(`Buildx.convertWarningsToGitHubAnnotations: skipping Dockerfile outside of workspace: ${ls.DockerfilePath}`);
|
core.debug(`Buildx.convertWarningsToGitHubAnnotations: skipping Dockerfile outside of workspace: ${ls.DockerfilePath}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user