mirror of
https://github.com/docker/build-push-action.git
synced 2026-01-14 00:13:05 +08:00
Compare commits
1 Commits
e6478a2405
...
9025ac81fb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9025ac81fb |
16
.github/workflows/buildkit-5561.yml
vendored
Normal file
16
.github/workflows/buildkit-5561.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
name: buildkit-5561
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -132,12 +132,7 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
|
||||
});
|
||||
if (await toolkit.buildx.versionSatisfies('>=0.8.0')) {
|
||||
await Util.asyncForEach(inputs['build-contexts'], async buildContext => {
|
||||
args.push(
|
||||
'--build-context',
|
||||
handlebars.compile(buildContext)({
|
||||
defaultContext: Context.gitContext()
|
||||
})
|
||||
);
|
||||
args.push('--build-context', buildContext);
|
||||
});
|
||||
} else if (inputs['build-contexts'].length > 0) {
|
||||
core.warning("Build contexts are only supported by buildx >= 0.8.0; the input 'build-contexts' is ignored.");
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM --platform=$BUILDPLATFORM alpine AS build
|
||||
FROM --platform=$BUILDPLATFORM golang:alpine AS build
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log
|
||||
@ -13,7 +12,7 @@ RUN apk --update --no-cache add \
|
||||
&& rm -rf /tmp/* /var/cache/apk/*
|
||||
|
||||
USER buildx
|
||||
RUN sudo chown buildx: /log
|
||||
RUN sudo chown buildx. /log
|
||||
USER root
|
||||
|
||||
FROM alpine
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user