From 1f1f11dad8668b94ce74a68f1e5647446aa3881d Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 2 Apr 2021 11:47:52 +0200 Subject: [PATCH] Enhance workflow Signed-off-by: CrazyMax --- .dockerignore | 3 -- .github/CONTRIBUTING.md | 27 ++++-------- .github/ISSUE_TEMPLATE/bug_report.md | 3 +- .github/setup-qemu-action.png | Bin 8669 -> 11797 bytes .github/workflows/ci.yml | 16 +++---- .github/workflows/validate.yml | 5 +-- dist/index.js | 9 +++- docker-bake.hcl | 62 +++++++++++++++------------ hack/build.Dockerfile | 42 ++++++++++++++++++ hack/vendor.Dockerfile | 23 ++++++++++ src/main.ts | 12 ++++-- 11 files changed, 135 insertions(+), 67 deletions(-) create mode 100644 hack/build.Dockerfile create mode 100644 hack/vendor.Dockerfile diff --git a/.dockerignore b/.dockerignore index 00a9f54..07e6e47 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1 @@ -/.dev -/dist -/lib /node_modules diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 4afc81e..958e5b9 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -2,31 +2,20 @@ Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. -Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE). +Contributions to this project are [released](https://docs.github.com/en/github/site-policy/github-terms-of-service#6-contributions-under-repository-license) +to the public under the [project's open source license](LICENSE). ## Submitting a pull request 1. [Fork](https://github.com/docker/setup-qemu-action/fork) and clone the repository 2. Configure and install the dependencies: `yarn install` -4. Create a new branch: `git checkout -b my-branch-name` -5. Make your change -6. Run pre-checkin: `yarn run pre-checkin` +3. Create a new branch: `git checkout -b my-branch-name` +4. Make your changes +5. Format code and build javascript artifacts: `docker buildx bake pre-checkin` +6. Validate all code has correctly formatted and built: `docker buildx bake validate` 7. Push to your fork and [submit a pull request](https://github.com/docker/setup-qemu-action/compare) 8. Pat your self on the back and wait for your pull request to be reviewed and merged. -## Container based developer flow - -If you don't want to maintain a Node developer environment that fits this project you can use containerized commands -instead of invoking yarn directly. - -``` -# format code and build javascript artifacts -docker buildx bake pre-checkin - -# validate all code has correctly formatted and built -docker buildx bake validate -``` - Here are a few things you can do that will increase the likelihood of your pull request being accepted: - Make sure the `README.md` and any other relevant **documentation are kept up-to-date**. @@ -37,5 +26,5 @@ Here are a few things you can do that will increase the likelihood of your pull ## Resources - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) -- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) -- [GitHub Help](https://help.github.com) +- [Using Pull Requests](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) +- [GitHub Help](https://docs.github.com/en) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 1c2136d..d50d109 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -30,4 +30,5 @@ about: Create a report to help us improve ### Logs -> Download the [log file of your build](https://help.github.com/en/actions/configuring-and-managing-workflows/managing-a-workflow-run#downloading-logs) and [attach it](https://help.github.com/en/github/managing-your-work-on-github/file-attachments-on-issues-and-pull-requests) to this issue. +> Download the [log file of your build](https://docs.github.com/en/actions/managing-workflow-runs/using-workflow-run-logs#downloading-logs) +> and [attach it](https://docs.github.com/en/github/managing-your-work-on-github/file-attachments-on-issues-and-pull-requests) to this issue. diff --git a/.github/setup-qemu-action.png b/.github/setup-qemu-action.png index d2ea83422dcf13c65edb7048d08c25653032a805..db1c9c036d5d65bb3d580bd47618b695e9f2dd56 100644 GIT binary patch literal 11797 zcmZX)2RvKt`#-K)?Sr0ih>Ri5iyR4=z7p! z*RMFTH25kaqHAES*KZU_Z&T9JvxLWIlHPtPdYjTT-qBQol9W}SNjrp8!jbegml`W2 z(``yOZ7wyR%y6rh;XeAJR+-^f-QqLd;xkR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D7qyGb(X7q{x diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9cfd7b..eabd34a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,18 +1,18 @@ name: ci on: + schedule: + - cron: '0 10 * * *' # everyday at 10am push: branches: - - master - - releases/v* - paths-ignore: - - '**.md' + - 'master' + - 'releases/v*' + tags: + - 'v*' pull_request: branches: - - master - - releases/v* - paths-ignore: - - '**.md' + - 'master' + - 'releases/v*' jobs: main: diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 2328016..c40e98f 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -5,13 +5,10 @@ on: branches: - 'master' - 'releases/v*' - paths-ignore: - - '**.md' pull_request: branches: - 'master' - paths-ignore: - - '**.md' + - 'releases/v*' jobs: validate: diff --git a/dist/index.js b/dist/index.js index 4643631..f9aa90f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -103,9 +103,13 @@ function run() { } const image = core.getInput('image') || 'tonistiigi/binfmt:latest'; const platforms = core.getInput('platforms') || 'all'; - core.info(`💎 Installing QEMU static binaries...`); + core.startGroup(`Pulling binfmt Docker image`); + yield exec.exec('docker', ['pull', image]); + core.endGroup(); + core.startGroup(`Installing QEMU static binaries`); yield exec.exec('docker', ['run', '--rm', '--privileged', image, '--install', platforms]); - core.info('🛒 Extracting available platforms...'); + core.endGroup(); + core.startGroup(`Extracting available platforms`); yield mexec.exec(`docker`, ['run', '--rm', '--privileged', image], true).then(res => { if (res.stderr != '' && !res.success) { throw new Error(res.stderr); @@ -114,6 +118,7 @@ function run() { core.info(`${platforms.supported.join(',')}`); core.setOutput('platforms', platforms.supported.join(',')); }); + core.endGroup(); } catch (error) { core.setFailed(error.message); diff --git a/docker-bake.hcl b/docker-bake.hcl index ab8b042..6c5d9d3 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,5 +1,11 @@ -variable "GITHUB_REPOSITORY" { - default = "docker/setup-qemu-action" +variable "NODE_VERSION" { + default = "12" +} + +target "node-version" { + args = { + NODE_VERSION = NODE_VERSION + } } group "default" { @@ -7,46 +13,48 @@ group "default" { } group "pre-checkin" { - targets = ["update-yarn", "format", "build"] + targets = ["vendor-update", "format", "build"] } group "validate" { - targets = ["validate-format", "validate-build", "validate-yarn"] -} - -target "dockerfile" { - dockerfile = "Dockerfile.dev" -} - -target "update-yarn" { - inherits = ["dockerfile"] - target = "update-yarn" - output = ["."] + targets = ["format-validate", "build-validate", "vendor-validate"] } target "build" { - inherits = ["dockerfile"] - target = "dist" + inherits = ["node-version"] + dockerfile = "./hack/build.Dockerfile" + target = "build-update" output = ["."] } +target "build-validate" { + inherits = ["node-version"] + dockerfile = "./hack/build.Dockerfile" + target = "build-validate" +} + target "format" { - inherits = ["dockerfile"] - target = "format" + inherits = ["node-version"] + dockerfile = "./hack/build.Dockerfile" + target = "format-update" output = ["."] } -target "validate-format" { - inherits = ["dockerfile"] - target = "validate-format" +target "format-validate" { + inherits = ["node-version"] + dockerfile = "./hack/build.Dockerfile" + target = "format-validate" } -target "validate-build" { - inherits = ["dockerfile"] - target = "validate-build" +target "vendor-update" { + inherits = ["node-version"] + dockerfile = "./hack/vendor.Dockerfile" + target = "update" + output = ["."] } -target "validate-yarn" { - inherits = ["dockerfile"] - target = "validate-yarn" +target "vendor-validate" { + inherits = ["node-version"] + dockerfile = "./hack/vendor.Dockerfile" + target = "validate" } diff --git a/hack/build.Dockerfile b/hack/build.Dockerfile new file mode 100644 index 0000000..a0796d7 --- /dev/null +++ b/hack/build.Dockerfile @@ -0,0 +1,42 @@ +# syntax=docker/dockerfile:1.2 +ARG NODE_VERSION + +FROM node:${NODE_VERSION}-alpine AS base +RUN apk add --no-cache cpio findutils git +WORKDIR /src + +FROM base AS deps +RUN --mount=type=bind,target=.,rw \ + --mount=type=cache,target=/src/node_modules \ + yarn install + +FROM deps AS build +RUN --mount=type=bind,target=.,rw \ + --mount=type=cache,target=/src/node_modules \ + yarn run build && mkdir /out && cp -Rf dist /out/ + +FROM scratch AS build-update +COPY --from=build /out / + +FROM build AS build-validate +RUN --mount=type=bind,target=.,rw \ + git add -A && cp -rf /out/* .; \ + if [ -n "$(git status --porcelain -- dist)" ]; then \ + echo >&2 'ERROR: Build result differs. Please build first with "docker buildx bake build"'; \ + git status --porcelain -- dist; \ + exit 1; \ + fi + +FROM deps AS format +RUN --mount=type=bind,target=.,rw \ + --mount=type=cache,target=/src/node_modules \ + yarn run format \ + && mkdir /out && find . -name '*.ts' -not -path './node_modules/*' | cpio -pdm /out + +FROM scratch AS format-update +COPY --from=format /out / + +FROM deps AS format-validate +RUN --mount=type=bind,target=.,rw \ + --mount=type=cache,target=/src/node_modules \ + yarn run format-check \ diff --git a/hack/vendor.Dockerfile b/hack/vendor.Dockerfile new file mode 100644 index 0000000..dd7906b --- /dev/null +++ b/hack/vendor.Dockerfile @@ -0,0 +1,23 @@ +# syntax=docker/dockerfile:1.2 +ARG NODE_VERSION + +FROM node:${NODE_VERSION}-alpine AS base +RUN apk add --no-cache git +WORKDIR /src + +FROM base AS vendored +RUN --mount=type=bind,target=.,rw \ + --mount=type=cache,target=/src/node_modules \ + yarn install && mkdir /out && cp yarn.lock /out + +FROM scratch AS update +COPY --from=vendored /out / + +FROM vendored AS validate +RUN --mount=type=bind,target=.,rw \ + git add -A && cp -rf /out/* .; \ + if [ -n "$(git status --porcelain -- yarn.lock)" ]; then \ + echo >&2 'ERROR: Vendor result differs. Please vendor your package with "docker buildx bake vendor-update"'; \ + git status --porcelain -- yarn.lock; \ + exit 1; \ + fi diff --git a/src/main.ts b/src/main.ts index 8530992..3af5e2b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -18,10 +18,15 @@ async function run(): Promise { const image: string = core.getInput('image') || 'tonistiigi/binfmt:latest'; const platforms: string = core.getInput('platforms') || 'all'; - core.info(`💎 Installing QEMU static binaries...`); - await exec.exec('docker', ['run', '--rm', '--privileged', image, '--install', platforms]); + core.startGroup(`Pulling binfmt Docker image`); + await exec.exec('docker', ['pull', image]); + core.endGroup(); - core.info('🛒 Extracting available platforms...'); + core.startGroup(`Installing QEMU static binaries`); + await exec.exec('docker', ['run', '--rm', '--privileged', image, '--install', platforms]); + core.endGroup(); + + core.startGroup(`Extracting available platforms`); await mexec.exec(`docker`, ['run', '--rm', '--privileged', image], true).then(res => { if (res.stderr != '' && !res.success) { throw new Error(res.stderr); @@ -30,6 +35,7 @@ async function run(): Promise { core.info(`${platforms.supported.join(',')}`); core.setOutput('platforms', platforms.supported.join(',')); }); + core.endGroup(); } catch (error) { core.setFailed(error.message); }