Compare commits

..

21 Commits

Author SHA1 Message Date
67a2d409c0 Merge pull request #1300 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.51.0
chore(deps): Bump @docker/actions-toolkit from 0.49.0 to 0.51.0
2025-01-15 13:50:03 +01:00
0b1b1c9c43 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-15 13:44:43 +01:00
b6a7c2c4ee chore(deps): Bump @docker/actions-toolkit from 0.49.0 to 0.51.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.49.0 to 0.51.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.49.0...v0.51.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-15 12:07:48 +00:00
31ca4e5d51 Merge pull request #1296 from crazy-max/bake-v6
update bake-action to v6
2025-01-08 18:54:38 +01:00
e613db9d5a update bake-action to v6
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-08 12:54:04 +01:00
b32b51a8ed Merge pull request #1281 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.49.0
chore(deps): Bump @docker/actions-toolkit from 0.46.0 to 0.49.0
2025-01-08 10:14:20 +01:00
594bf46f0f Merge pull request #1294 from crazy-max/fix-e2e
ci(e2e): fix setup docker config
2025-01-08 10:14:00 +01:00
fd37bd55af ci(e2e): fix setup docker config
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-08 10:09:44 +01:00
e6478a2405 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-08 10:02:55 +01:00
78785bddff chore(deps): Bump @docker/actions-toolkit from 0.46.0 to 0.49.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.46.0 to 0.49.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.46.0...v0.49.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-08 08:59:30 +00:00
128779fed7 Merge pull request #1283 from crazy-max/named-context-handlebars
handlebar defaultContext support for build-contexts input
2025-01-08 09:57:16 +01:00
7e094594be Merge pull request #1282 from crazy-max/remove-buildkit-5561
Revert "init buildkit-5561 workflow"
2024-12-17 16:32:34 +01:00
32ee877a58 Revert "init buildkit-5561 workflow"
This reverts commit f5a8591a7f.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 16:26:04 +01:00
d1a4129c41 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 16:25:57 +01:00
49c623eaf8 handlebar defaultContext support for build-contexts input
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 16:25:56 +01:00
bcc9f4afe7 Merge pull request #1284 from crazy-max/dockerfiles-pin-bases
test: fix multi-sudo dockerfile
2024-12-17 16:18:44 +01:00
da5b6c75b9 test: fix multi-sudo dockerfile
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 16:12:32 +01:00
11be14d908 Merge pull request #1274 from crazy-max/init-buildkit-5561
init buildkit-5561 workflow
2024-12-05 15:27:22 +01:00
f5a8591a7f init buildkit-5561 workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-05 15:21:59 +01:00
8796455d32 Merge pull request #1272 from crazy-max/update-readme
readme: move login step up
2024-12-03 16:04:51 +01:00
750f367828 readme: move login step up
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-03 15:36:12 +01:00
11 changed files with 68 additions and 53 deletions

View File

@ -65,10 +65,11 @@ jobs:
if: inputs.type == 'local'
run: |
if [ ! -e /etc/docker/daemon.json ]; then
echo '{}' | tee /etc/docker/daemon.json >/dev/null
echo '{}' | sudo tee /etc/docker/daemon.json >/dev/null
fi
DOCKERD_CONFIG=$(jq '.+{"insecure-registries":["http://${{ env.REGISTRY_FQDN }}"]}' /etc/docker/daemon.json)
sudo tee /etc/docker/daemon.json <<<"$DOCKERD_CONFIG" >/dev/null
cat /etc/docker/daemon.json
sudo service docker restart
-
name: Install ${{ inputs.name }}

View File

@ -15,12 +15,9 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Test
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
targets: test
-

View File

@ -15,16 +15,17 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.targets.outputs.matrix }}
targets: ${{ steps.generate.outputs.targets }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Targets matrix
id: targets
run: |
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT
name: List targets
id: generate
uses: docker/bake-action/subaction/list-targets@v6
with:
target: validate
validate:
runs-on: ubuntu-latest
@ -35,11 +36,8 @@ jobs:
matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Validate
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
targets: ${{ matrix.target }}

View File

@ -60,18 +60,18 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
@ -132,18 +132,18 @@ jobs:
-
name: Checkout
uses: actions/checkout@v4
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6

24
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,9 @@
target "_common" {
args = {
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
}
}
group "default" {
targets = ["build"]
}
@ -11,42 +17,49 @@ group "validate" {
}
target "build" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "build-update"
output = ["."]
}
target "build-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "build-validate"
output = ["type=cacheonly"]
}
target "format" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "format-update"
output = ["."]
}
target "lint" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "lint"
output = ["type=cacheonly"]
}
target "vendor" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "vendor-update"
output = ["."]
}
target "vendor-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "vendor-validate"
output = ["type=cacheonly"]
}
target "test" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile"
target = "test-coverage"
output = ["./coverage"]

View File

@ -27,7 +27,7 @@
"packageManager": "yarn@3.6.3",
"dependencies": {
"@actions/core": "^1.11.1",
"@docker/actions-toolkit": "0.46.0",
"@docker/actions-toolkit": "0.51.0",
"handlebars": "^4.7.7"
},
"devDependencies": {

View File

@ -132,7 +132,12 @@ 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', buildContext);
args.push(
'--build-context',
handlebars.compile(buildContext)({
defaultContext: Context.gitContext()
})
);
});
} 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.");

View File

@ -1,5 +1,6 @@
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:alpine AS build
FROM --platform=$BUILDPLATFORM alpine AS build
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log
@ -12,7 +13,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

View File

@ -12,9 +12,9 @@ __metadata:
languageName: node
linkType: hard
"@actions/artifact@npm:^2.1.11":
version: 2.1.11
resolution: "@actions/artifact@npm:2.1.11"
"@actions/artifact@npm:^2.2.1":
version: 2.2.1
resolution: "@actions/artifact@npm:2.2.1"
dependencies:
"@actions/core": ^1.10.0
"@actions/github": ^5.1.1
@ -29,7 +29,7 @@ __metadata:
jwt-decode: ^3.1.2
twirp-ts: ^2.5.0
unzip-stream: ^0.3.1
checksum: dbdafaad11cc573768a00f6b8a7f5109f587eb9461564ae8f15ea8fd1d6a719041df45a92ec204a43a8a1e7ce2c21d8e4229543579b89a3ca8ea30dedddf2fc9
checksum: 6ce4e62d941f17743c845637cdd832ca34c77efe0c31cf7f6ab3ad0531e54e62d4379198e8af5e84463b5f5ae0bc0ea11d41cc77c5fae7e511c7ef01742892ea
languageName: node
linkType: hard
@ -1073,11 +1073,11 @@ __metadata:
languageName: node
linkType: hard
"@docker/actions-toolkit@npm:0.46.0":
version: 0.46.0
resolution: "@docker/actions-toolkit@npm:0.46.0"
"@docker/actions-toolkit@npm:0.51.0":
version: 0.51.0
resolution: "@docker/actions-toolkit@npm:0.51.0"
dependencies:
"@actions/artifact": ^2.1.11
"@actions/artifact": ^2.2.1
"@actions/cache": ^3.3.0
"@actions/core": ^1.11.1
"@actions/exec": ^1.1.1
@ -1098,7 +1098,7 @@ __metadata:
semver: ^7.6.3
tar-stream: ^3.1.7
tmp: ^0.2.3
checksum: cd34682d1b801c17c81f7f6791c4c81a69018f02413a1f7a7c2c1086bf0ee98c9afb5b44e6d5b8827df188819913eec47fa5b54b63f522b4a87c216de0b5725f
checksum: 03d25e8896fed69db608aad58995a41f57325c1e26c197040990c671dfbdeddd2483028d24c2d4505c010a87992780ee09d9e1f1141dda5662857050d644a99b
languageName: node
linkType: hard
@ -3161,7 +3161,7 @@ __metadata:
resolution: "docker-build-push@workspace:."
dependencies:
"@actions/core": ^1.11.1
"@docker/actions-toolkit": 0.46.0
"@docker/actions-toolkit": 0.51.0
"@types/node": ^20.12.12
"@typescript-eslint/eslint-plugin": ^7.9.0
"@typescript-eslint/parser": ^7.9.0