Compare commits

..

16 Commits

Author SHA1 Message Date
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
8 changed files with 32 additions and 25 deletions

View File

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

View File

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

4
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

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

View File

@ -132,7 +132,12 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
}); });
if (await toolkit.buildx.versionSatisfies('>=0.8.0')) { if (await toolkit.buildx.versionSatisfies('>=0.8.0')) {
await Util.asyncForEach(inputs['build-contexts'], async buildContext => { 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) { } 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."); 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 # syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:alpine AS build
FROM --platform=$BUILDPLATFORM alpine AS build
ARG TARGETPLATFORM ARG TARGETPLATFORM
ARG BUILDPLATFORM ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log 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/* && rm -rf /tmp/* /var/cache/apk/*
USER buildx USER buildx
RUN sudo chown buildx. /log RUN sudo chown buildx: /log
USER root USER root
FROM alpine FROM alpine

View File

@ -1073,9 +1073,9 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@docker/actions-toolkit@npm:0.46.0": "@docker/actions-toolkit@npm:0.49.0":
version: 0.46.0 version: 0.49.0
resolution: "@docker/actions-toolkit@npm:0.46.0" resolution: "@docker/actions-toolkit@npm:0.49.0"
dependencies: dependencies:
"@actions/artifact": ^2.1.11 "@actions/artifact": ^2.1.11
"@actions/cache": ^3.3.0 "@actions/cache": ^3.3.0
@ -1098,7 +1098,7 @@ __metadata:
semver: ^7.6.3 semver: ^7.6.3
tar-stream: ^3.1.7 tar-stream: ^3.1.7
tmp: ^0.2.3 tmp: ^0.2.3
checksum: cd34682d1b801c17c81f7f6791c4c81a69018f02413a1f7a7c2c1086bf0ee98c9afb5b44e6d5b8827df188819913eec47fa5b54b63f522b4a87c216de0b5725f checksum: 5e945601180002f129f095bba2d7d938b5ca69e87631d5e96a0d3b2254a8b034ab4bafbf7582ea82995e39610ad00fd68b34ab5875b9b314690328f714ad79d0
languageName: node languageName: node
linkType: hard linkType: hard
@ -3161,7 +3161,7 @@ __metadata:
resolution: "docker-build-push@workspace:." resolution: "docker-build-push@workspace:."
dependencies: dependencies:
"@actions/core": ^1.11.1 "@actions/core": ^1.11.1
"@docker/actions-toolkit": 0.46.0 "@docker/actions-toolkit": 0.49.0
"@types/node": ^20.12.12 "@types/node": ^20.12.12
"@typescript-eslint/eslint-plugin": ^7.9.0 "@typescript-eslint/eslint-plugin": ^7.9.0
"@typescript-eslint/parser": ^7.9.0 "@typescript-eslint/parser": ^7.9.0