mirror of
https://gitea.com/docker/setup-buildx-action.git
synced 2024-11-21 17:09:34 +01:00
update to yarn 3.6.3
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
a530e948ad
commit
157d6d0106
9 changed files with 6356 additions and 4243 deletions
|
@ -1,2 +1,12 @@
|
||||||
/coverage
|
/coverage
|
||||||
/node_modules
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# yarn v2
|
||||||
|
.yarn/cache
|
||||||
|
.yarn/unplugged
|
||||||
|
.yarn/build-state.yml
|
||||||
|
.yarn/install-state.gz
|
||||||
|
.pnp.*
|
||||||
|
|
2
.gitattributes
vendored
2
.gitattributes
vendored
|
@ -1,2 +1,4 @@
|
||||||
|
/.yarn/releases/** binary
|
||||||
|
/.yarn/plugins/** binary
|
||||||
/dist/** linguist-generated=true
|
/dist/** linguist-generated=true
|
||||||
/lib/** linguist-generated=true
|
/lib/** linguist-generated=true
|
||||||
|
|
71
.gitignore
vendored
71
.gitignore
vendored
|
@ -1,12 +1,5 @@
|
||||||
/.dev
|
# https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
|
||||||
node_modules
|
|
||||||
lib
|
|
||||||
|
|
||||||
# Jetbrains
|
|
||||||
/.idea
|
|
||||||
/*.iml
|
|
||||||
|
|
||||||
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
|
|
||||||
# Logs
|
# Logs
|
||||||
logs
|
logs
|
||||||
*.log
|
*.log
|
||||||
|
@ -14,6 +7,7 @@ npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
lerna-debug.log*
|
lerna-debug.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
@ -24,34 +18,14 @@ pids
|
||||||
*.seed
|
*.seed
|
||||||
*.pid.lock
|
*.pid.lock
|
||||||
|
|
||||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
||||||
lib-cov
|
|
||||||
|
|
||||||
# Coverage directory used by tools like istanbul
|
# Coverage directory used by tools like istanbul
|
||||||
coverage
|
coverage
|
||||||
*.lcov
|
*.lcov
|
||||||
|
|
||||||
# nyc test coverage
|
|
||||||
.nyc_output
|
|
||||||
|
|
||||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
||||||
.grunt
|
|
||||||
|
|
||||||
# Bower dependency directory (https://bower.io/)
|
|
||||||
bower_components
|
|
||||||
|
|
||||||
# node-waf configuration
|
|
||||||
.lock-wscript
|
|
||||||
|
|
||||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
||||||
build/Release
|
|
||||||
|
|
||||||
# Dependency directories
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
jspm_packages/
|
jspm_packages/
|
||||||
|
|
||||||
# TypeScript v1 declaration files
|
|
||||||
typings/
|
|
||||||
|
|
||||||
# TypeScript cache
|
# TypeScript cache
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
@ -61,36 +35,19 @@ typings/
|
||||||
# Optional eslint cache
|
# Optional eslint cache
|
||||||
.eslintcache
|
.eslintcache
|
||||||
|
|
||||||
# Optional REPL history
|
|
||||||
.node_repl_history
|
|
||||||
|
|
||||||
# Output of 'npm pack'
|
|
||||||
*.tgz
|
|
||||||
|
|
||||||
# Yarn Integrity file
|
# Yarn Integrity file
|
||||||
.yarn-integrity
|
.yarn-integrity
|
||||||
|
|
||||||
# dotenv environment variables file
|
# dotenv environment variable files
|
||||||
.env
|
.env
|
||||||
.env.test
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
.env.local
|
||||||
|
|
||||||
# parcel-bundler cache (https://parceljs.org/)
|
# yarn v2
|
||||||
.cache
|
.yarn/cache
|
||||||
|
.yarn/unplugged
|
||||||
# next.js build output
|
.yarn/build-state.yml
|
||||||
.next
|
.yarn/install-state.gz
|
||||||
|
.pnp.*
|
||||||
# nuxt.js build output
|
|
||||||
.nuxt
|
|
||||||
|
|
||||||
# vuepress build output
|
|
||||||
.vuepress/dist
|
|
||||||
|
|
||||||
# Serverless directories
|
|
||||||
.serverless/
|
|
||||||
|
|
||||||
# FuseBox cache
|
|
||||||
.fusebox/
|
|
||||||
|
|
||||||
# DynamoDB Local files
|
|
||||||
.dynamodb/
|
|
||||||
|
|
6
.prettierignore
Normal file
6
.prettierignore
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# yarn v2
|
||||||
|
.yarn/
|
9
.yarnrc.yml
Normal file
9
.yarnrc.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
logFilters:
|
||||||
|
- code: YN0013
|
||||||
|
level: discard
|
||||||
|
- code: YN0019
|
||||||
|
level: discard
|
||||||
|
- code: YN0076
|
||||||
|
level: discard
|
||||||
|
|
||||||
|
nodeLinker: node-modules
|
|
@ -5,9 +5,16 @@ ARG NODE_VERSION=20
|
||||||
FROM node:${NODE_VERSION}-alpine AS base
|
FROM node:${NODE_VERSION}-alpine AS base
|
||||||
RUN apk add --no-cache cpio findutils git
|
RUN apk add --no-cache cpio findutils git
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
RUN --mount=type=bind,target=.,rw \
|
||||||
|
--mount=type=cache,target=/src/.yarn/cache <<EOT
|
||||||
|
corepack enable
|
||||||
|
yarn --version
|
||||||
|
yarn config set --home enableTelemetry 0
|
||||||
|
EOT
|
||||||
|
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
RUN --mount=type=bind,target=.,rw \
|
RUN --mount=type=bind,target=.,rw \
|
||||||
|
--mount=type=cache,target=/src/.yarn/cache \
|
||||||
--mount=type=cache,target=/src/node_modules \
|
--mount=type=cache,target=/src/node_modules \
|
||||||
yarn install && mkdir /vendor && cp yarn.lock /vendor
|
yarn install && mkdir /vendor && cp yarn.lock /vendor
|
||||||
|
|
||||||
|
@ -20,7 +27,7 @@ set -e
|
||||||
git add -A
|
git add -A
|
||||||
cp -rf /vendor/* .
|
cp -rf /vendor/* .
|
||||||
if [ -n "$(git status --porcelain -- yarn.lock)" ]; then
|
if [ -n "$(git status --porcelain -- yarn.lock)" ]; then
|
||||||
echo >&2 'ERROR: Vendor result differs. Please vendor your package with "docker buildx bake vendor-update"'
|
echo >&2 'ERROR: Vendor result differs. Please vendor your package with "docker buildx bake vendor"'
|
||||||
git status --porcelain -- yarn.lock
|
git status --porcelain -- yarn.lock
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -28,6 +35,7 @@ EOT
|
||||||
|
|
||||||
FROM deps AS build
|
FROM deps AS build
|
||||||
RUN --mount=type=bind,target=.,rw \
|
RUN --mount=type=bind,target=.,rw \
|
||||||
|
--mount=type=cache,target=/src/.yarn/cache \
|
||||||
--mount=type=cache,target=/src/node_modules \
|
--mount=type=cache,target=/src/node_modules \
|
||||||
yarn run build && mkdir /out && cp -Rf dist /out/
|
yarn run build && mkdir /out && cp -Rf dist /out/
|
||||||
|
|
||||||
|
@ -48,22 +56,23 @@ EOT
|
||||||
|
|
||||||
FROM deps AS format
|
FROM deps AS format
|
||||||
RUN --mount=type=bind,target=.,rw \
|
RUN --mount=type=bind,target=.,rw \
|
||||||
|
--mount=type=cache,target=/src/.yarn/cache \
|
||||||
--mount=type=cache,target=/src/node_modules \
|
--mount=type=cache,target=/src/node_modules \
|
||||||
yarn run format \
|
yarn run format \
|
||||||
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' | cpio -pdm /out
|
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' -not -path './.yarn/*' | cpio -pdm /out
|
||||||
|
|
||||||
FROM scratch AS format-update
|
FROM scratch AS format-update
|
||||||
COPY --from=format /out /
|
COPY --from=format /out /
|
||||||
|
|
||||||
FROM deps AS lint
|
FROM deps AS lint
|
||||||
RUN --mount=type=bind,target=.,rw \
|
RUN --mount=type=bind,target=.,rw \
|
||||||
|
--mount=type=cache,target=/src/.yarn/cache \
|
||||||
--mount=type=cache,target=/src/node_modules \
|
--mount=type=cache,target=/src/node_modules \
|
||||||
yarn run lint
|
yarn run lint
|
||||||
|
|
||||||
FROM deps AS test
|
FROM deps AS test
|
||||||
ENV RUNNER_TEMP=/tmp/github_runner
|
|
||||||
ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
|
|
||||||
RUN --mount=type=bind,target=.,rw \
|
RUN --mount=type=bind,target=.,rw \
|
||||||
|
--mount=type=cache,target=/src/.yarn/cache \
|
||||||
--mount=type=cache,target=/src/node_modules \
|
--mount=type=cache,target=/src/node_modules \
|
||||||
yarn run test --coverage --coverageDirectory=/tmp/coverage
|
yarn run test --coverage --coverageDirectory=/tmp/coverage
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ group "default" {
|
||||||
}
|
}
|
||||||
|
|
||||||
group "pre-checkin" {
|
group "pre-checkin" {
|
||||||
targets = ["vendor-update", "format", "build"]
|
targets = ["vendor", "format", "build"]
|
||||||
}
|
}
|
||||||
|
|
||||||
group "validate" {
|
group "validate" {
|
||||||
|
@ -34,7 +34,7 @@ target "lint" {
|
||||||
output = ["type=cacheonly"]
|
output = ["type=cacheonly"]
|
||||||
}
|
}
|
||||||
|
|
||||||
target "vendor-update" {
|
target "vendor" {
|
||||||
dockerfile = "dev.Dockerfile"
|
dockerfile = "dev.Dockerfile"
|
||||||
target = "vendor-update"
|
target = "vendor-update"
|
||||||
output = ["."]
|
output = ["."]
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "docker-setup-buildx",
|
"name": "docker-setup-buildx",
|
||||||
"description": "Set up Docker Buildx",
|
"description": "Set up Docker Buildx",
|
||||||
"main": "lib/main.js",
|
"main": "src/main.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ncc build src/main.ts --source-map --minify --license licenses.txt",
|
"build": "ncc build --source-map --minify --license licenses.txt",
|
||||||
"lint": "yarn run prettier && yarn run eslint",
|
"lint": "yarn run prettier && yarn run eslint",
|
||||||
"format": "yarn run prettier:fix && yarn run eslint:fix",
|
"format": "yarn run prettier:fix && yarn run eslint:fix",
|
||||||
"eslint": "eslint --max-warnings=0 .",
|
"eslint": "eslint --max-warnings=0 .",
|
||||||
"eslint:fix": "eslint --fix .",
|
"eslint:fix": "eslint --fix .",
|
||||||
"prettier": "prettier --check \"./**/*.ts\"",
|
"prettier": "prettier --check \"./**/*.ts\"",
|
||||||
"prettier:fix": "prettier --write \"./**/*.ts\"",
|
"prettier:fix": "prettier --write \"./**/*.ts\"",
|
||||||
"test": "jest",
|
"test": "jest"
|
||||||
"all": "yarn run build && yarn run format && yarn test"
|
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -24,6 +23,7 @@
|
||||||
],
|
],
|
||||||
"author": "Docker Inc.",
|
"author": "Docker Inc.",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
"packageManager": "yarn@3.6.3",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
"@docker/actions-toolkit": "^0.20.0",
|
"@docker/actions-toolkit": "^0.20.0",
|
||||||
|
|
Loading…
Reference in a new issue