mirror of
https://github.com/docker/bake-action.git
synced 2026-06-05 09:38:40 +02:00
Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 03bdd49965 | |||
| 41a29e21ad | |||
| e0c37242bd | |||
| 68d82b0527 | |||
| 422e39df00 | |||
| 180a839280 | |||
| a2173f5d12 | |||
| 1882cef5ad | |||
| bb74ce9b2f | |||
| f8458252dd | |||
| e5a40e00dd | |||
| 52facdd663 | |||
| 51fac70fbd | |||
| ff61180a8c | |||
| beb29f01eb | |||
| e0e5acbcf6 | |||
| 23ce12d397 | |||
| 3dd1069797 | |||
| 117945163a | |||
| 9a699390ae | |||
| fdf541d559 | |||
| 039351a2d8 | |||
| 145f15f226 | |||
| df524babc0 | |||
| eefeb0e772 | |||
| d1deb4aab8 | |||
| 2536e18313 | |||
| 1f3247e079 | |||
| 682140a802 | |||
| d9617c96e7 | |||
| 1f4826bf10 | |||
| 705ad8462f | |||
| 35114fcfd9 | |||
| a4761ca272 | |||
| 13a4ad8123 | |||
| ba4ff09aab |
@@ -1,6 +1,2 @@
|
|||||||
/.dev
|
|
||||||
/coverage
|
/coverage
|
||||||
/dist
|
|
||||||
/lib
|
|
||||||
/node_modules
|
/node_modules
|
||||||
/.env
|
|
||||||
|
|||||||
@@ -2,22 +2,24 @@
|
|||||||
|
|
||||||
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
|
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
|
## Submitting a pull request
|
||||||
|
|
||||||
1. [Fork](https://github.com/crazy-max/ghaction-docker-buildx-bake/fork) and clone the repository
|
1. [Fork](https://github.com/docker/bake-action/fork) and clone the repository
|
||||||
2. Configure and install the dependencies: `yarn install`
|
2. Configure and install the dependencies: `yarn install`
|
||||||
3. Create a new branch: `git checkout -b my-branch-name`
|
3. Create a new branch: `git checkout -b my-branch-name`
|
||||||
4. Make your changes
|
4. Make your changes
|
||||||
5. Make sure the tests pass: `docker buildx bake test`
|
5. Make sure the tests pass: `docker buildx bake test`
|
||||||
6. Format code and build javascript artifacts: `docker buildx bake pre-checkin`
|
6. Format code and build javascript artifacts: `docker buildx bake pre-checkin`
|
||||||
7. Validate all code has correctly formatted and built: `docker buildx bake validate`
|
7. Validate all code has correctly formatted and built: `docker buildx bake validate`
|
||||||
8. Push to your fork and [submit a pull request](https://github.com/crazy-max/ghaction-docker-buildx-bake/compare)
|
8. Push to your fork and [submit a pull request](https://github.com/docker/bake-action/compare)
|
||||||
9. Pat your self on the back and wait for your pull request to be reviewed and merged.
|
9. Pat your self on the back and wait for your pull request to be reviewed and merged.
|
||||||
|
|
||||||
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
|
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
|
||||||
|
|
||||||
|
- Write tests.
|
||||||
- Make sure the `README.md` and any other relevant **documentation are kept up-to-date**.
|
- Make sure the `README.md` and any other relevant **documentation are kept up-to-date**.
|
||||||
- We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
|
- We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
|
||||||
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as **separate pull requests**.
|
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as **separate pull requests**.
|
||||||
@@ -26,5 +28,5 @@ Here are a few things you can do that will increase the likelihood of your pull
|
|||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
|
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
|
||||||
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
|
- [Using Pull Requests](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
|
||||||
- [GitHub Help](https://help.github.com)
|
- [GitHub Help](https://docs.github.com/en)
|
||||||
|
|||||||
@@ -30,4 +30,5 @@ about: Create a report to help us improve
|
|||||||
|
|
||||||
### Logs
|
### 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.
|
||||||
|
|||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
# Support [](https://isitmaintained.com/project/crazy-max/ghaction-docker-buildx-bake)
|
# Support [](https://isitmaintained.com/project/docker/bake-action)
|
||||||
|
|
||||||
First, [be a good guy](https://github.com/kossnocorp/etiquette/blob/master/README.md).
|
First, [be a good guy](https://github.com/kossnocorp/etiquette/blob/master/README.md).
|
||||||
|
|
||||||
## Reporting an issue
|
## Reporting an issue
|
||||||
|
|
||||||
Please do a search in [open issues](https://github.com/crazy-max/ghaction-docker-buildx-bake/issues?utf8=%E2%9C%93&q=) to see if the issue or feature request has already been filed.
|
Please do a search in [open issues](https://github.com/docker/bake-action/issues?utf8=%E2%9C%93&q=) to see if the issue or feature request has already been filed.
|
||||||
|
|
||||||
If you find your issue already exists, make relevant comments and add your [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments). Use a reaction in place of a "+1" comment.
|
If you find your issue already exists, make relevant comments and add your [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments). Use a reaction in place of a "+1" comment.
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ File a single issue per problem and feature request.
|
|||||||
|
|
||||||
The more information you can provide, the more likely someone will be successful reproducing the issue and finding a fix.
|
The more information you can provide, the more likely someone will be successful reproducing the issue and finding a fix.
|
||||||
|
|
||||||
You are now ready to [create a new issue](https://github.com/crazy-max/ghaction-docker-buildx-bake/issues/new/choose)!
|
You are now ready to [create a new issue](https://github.com/docker/bake-action/issues/new/choose)!
|
||||||
|
|
||||||
## Closure policy
|
## Closure policy
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -1,79 +0,0 @@
|
|||||||
## more info https://github.com/crazy-max/ghaction-github-labeler
|
|
||||||
- # automerge
|
|
||||||
name: ":bell: automerge"
|
|
||||||
color: "8f4fbc"
|
|
||||||
description: ""
|
|
||||||
- # bot
|
|
||||||
name: ":robot: bot"
|
|
||||||
color: "69cde9"
|
|
||||||
description: ""
|
|
||||||
- # bug
|
|
||||||
name: ":bug: bug"
|
|
||||||
color: "b60205"
|
|
||||||
description: ""
|
|
||||||
- # dependencies
|
|
||||||
name: ":game_die: dependencies"
|
|
||||||
color: "0366d6"
|
|
||||||
description: ""
|
|
||||||
from_name: "dependencies"
|
|
||||||
- # documentation
|
|
||||||
name: ":memo: documentation"
|
|
||||||
color: "c5def5"
|
|
||||||
description: ""
|
|
||||||
- # duplicate
|
|
||||||
name: ":busts_in_silhouette: duplicate"
|
|
||||||
color: "cccccc"
|
|
||||||
description: ""
|
|
||||||
- # enhancement
|
|
||||||
name: ":sparkles: enhancement"
|
|
||||||
color: "0054ca"
|
|
||||||
description: ""
|
|
||||||
- # feature request
|
|
||||||
name: ":bulb: feature request"
|
|
||||||
color: "0e8a16"
|
|
||||||
description: ""
|
|
||||||
- # feedback
|
|
||||||
name: ":mega: feedback"
|
|
||||||
color: "03a9f4"
|
|
||||||
description: ""
|
|
||||||
- # future maybe
|
|
||||||
name: ":rocket: future maybe"
|
|
||||||
color: "fef2c0"
|
|
||||||
description: ""
|
|
||||||
- # good first issue
|
|
||||||
name: ":hatching_chick: good first issue"
|
|
||||||
color: "7057ff"
|
|
||||||
description: ""
|
|
||||||
- # help wanted
|
|
||||||
name: ":pray: help wanted"
|
|
||||||
color: "4caf50"
|
|
||||||
description: ""
|
|
||||||
- # hold
|
|
||||||
name: ":hand: hold"
|
|
||||||
color: "24292f"
|
|
||||||
description: ""
|
|
||||||
- # invalid
|
|
||||||
name: ":no_entry_sign: invalid"
|
|
||||||
color: "e6e6e6"
|
|
||||||
description: ""
|
|
||||||
- # maybe bug
|
|
||||||
name: ":interrobang: maybe bug"
|
|
||||||
color: "ff5722"
|
|
||||||
description: ""
|
|
||||||
- # needs more info
|
|
||||||
name: ":thinking: needs more info"
|
|
||||||
color: "795548"
|
|
||||||
description: ""
|
|
||||||
- # question
|
|
||||||
name: ":question: question"
|
|
||||||
color: "3f51b5"
|
|
||||||
description: ""
|
|
||||||
from_name: "question"
|
|
||||||
- # upstream
|
|
||||||
name: ":eyes: upstream"
|
|
||||||
color: "fbca04"
|
|
||||||
description: ""
|
|
||||||
- # wontfix
|
|
||||||
name: ":coffin: wontfix"
|
|
||||||
color: "ffffff"
|
|
||||||
description: ""
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# Number of days of inactivity before an issue becomes stale
|
|
||||||
daysUntilStale: 30
|
|
||||||
# Number of days of inactivity before a stale issue is closed
|
|
||||||
daysUntilClose: 7
|
|
||||||
# Issues with these labels will never be considered stale
|
|
||||||
exemptLabels:
|
|
||||||
- ":hand: hold"
|
|
||||||
# Set to true to ignore issues in a milestone (defaults to false)
|
|
||||||
exemptMilestones: true
|
|
||||||
# Label to use when marking an issue as stale
|
|
||||||
staleLabel: ":skull: stale"
|
|
||||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
|
||||||
markComment: >
|
|
||||||
This issue has been automatically marked as stale because it has not had
|
|
||||||
recent activity. It will be closed if no further activity occurs. Thank you
|
|
||||||
for your contributions.
|
|
||||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
|
||||||
closeComment: false
|
|
||||||
@@ -1,12 +1,18 @@
|
|||||||
name: ci
|
name: ci
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 10 * * *' # everyday at 10am
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- 'master'
|
||||||
|
- 'releases/v*'
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- 'master'
|
||||||
|
- 'releases/v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bake:
|
bake:
|
||||||
@@ -37,7 +43,6 @@ jobs:
|
|||||||
driver-opts: network=host
|
driver-opts: network=host
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build and push
|
||||||
id: docker_build
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
@@ -50,3 +55,54 @@ jobs:
|
|||||||
name: Dump context
|
name: Dump context
|
||||||
if: always()
|
if: always()
|
||||||
uses: crazy-max/ghaction-dump-context@v1
|
uses: crazy-max/ghaction-dump-context@v1
|
||||||
|
|
||||||
|
error-msg:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Build
|
||||||
|
continue-on-error: true
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
./test/config.hcl
|
||||||
|
set: |
|
||||||
|
*.platform=linux/amd64,linux/ppc64le,linux/s390x
|
||||||
|
-
|
||||||
|
name: Dump context
|
||||||
|
if: always()
|
||||||
|
uses: crazy-max/ghaction-dump-context@v1
|
||||||
|
|
||||||
|
error-check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Stop docker
|
||||||
|
run: |
|
||||||
|
sudo systemctl stop docker
|
||||||
|
-
|
||||||
|
name: Build
|
||||||
|
id: bake
|
||||||
|
continue-on-error: true
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
./test/config.hcl
|
||||||
|
-
|
||||||
|
name: Check
|
||||||
|
run: |
|
||||||
|
echo "${{ toJson(steps.bake) }}"
|
||||||
|
if [ "${{ steps.bake.outcome }}" != "failure" ] || [ "${{ steps.bake.conclusion }}" != "success" ]; then
|
||||||
|
echo "::error::Should have failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
-
|
||||||
|
name: Dump context
|
||||||
|
if: always()
|
||||||
|
uses: crazy-max/ghaction-dump-context@v1
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
name: labels
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
paths:
|
|
||||||
- '.github/labels.yml'
|
|
||||||
- '.github/workflows/labels.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
labeler:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
-
|
|
||||||
name: Run Labeler
|
|
||||||
uses: crazy-max/ghaction-github-labeler@v3
|
|
||||||
@@ -5,13 +5,10 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
- 'releases/v*'
|
- 'releases/v*'
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
paths-ignore:
|
- 'releases/v*'
|
||||||
- '**.md'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -22,10 +19,11 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
-
|
-
|
||||||
name: Test
|
name: Test
|
||||||
run: docker buildx bake test
|
uses: docker/bake-action@v1
|
||||||
|
with:
|
||||||
|
targets: test
|
||||||
-
|
-
|
||||||
name: Upload coverage
|
name: Upload coverage
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
file: ./coverage/clover.xml
|
file: ./coverage/clover.xml
|
||||||
|
|||||||
@@ -5,13 +5,10 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
- 'releases/v*'
|
- 'releases/v*'
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
paths-ignore:
|
- 'releases/v*'
|
||||||
- '**.md'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate:
|
validate:
|
||||||
@@ -22,4 +19,6 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
-
|
-
|
||||||
name: Validate
|
name: Validate
|
||||||
run: docker buildx bake validate
|
uses: docker/bake-action@v1
|
||||||
|
with:
|
||||||
|
targets: validate
|
||||||
|
|||||||
@@ -1,59 +0,0 @@
|
|||||||
#syntax=docker/dockerfile:1.2
|
|
||||||
|
|
||||||
FROM node:12 AS deps
|
|
||||||
WORKDIR /src
|
|
||||||
COPY package.json yarn.lock ./
|
|
||||||
RUN --mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
FROM scratch AS update-yarn
|
|
||||||
COPY --from=deps /src/yarn.lock /
|
|
||||||
|
|
||||||
FROM deps AS validate-yarn
|
|
||||||
COPY .git .git
|
|
||||||
RUN status=$(git status --porcelain -- yarn.lock); if [ -n "$status" ]; then echo $status; exit 1; fi
|
|
||||||
|
|
||||||
FROM deps AS base
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
FROM base AS build
|
|
||||||
RUN --mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn build
|
|
||||||
|
|
||||||
FROM deps AS test
|
|
||||||
COPY --from=docker /usr/local/bin/docker /usr/bin/
|
|
||||||
ARG TARGETOS
|
|
||||||
ARG TARGETARCH
|
|
||||||
ENV RUNNER_TEMP=/tmp/github_runner
|
|
||||||
ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
|
|
||||||
ARG BUILDX_VERSION=v0.5.1
|
|
||||||
RUN mkdir -p /usr/local/lib/docker/cli-plugins \
|
|
||||||
&& curl -fsSL https://github.com/docker/buildx/releases/download/$BUILDX_VERSION/buildx-$BUILDX_VERSION.$TARGETOS-$TARGETARCH > /usr/local/lib/docker/cli-plugins/docker-buildx \
|
|
||||||
&& chmod +x /usr/local/lib/docker/cli-plugins/docker-buildx \
|
|
||||||
&& docker buildx version
|
|
||||||
COPY . .
|
|
||||||
RUN --mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn run test
|
|
||||||
|
|
||||||
FROM scratch AS test-coverage
|
|
||||||
COPY --from=test /src/coverage /coverage/
|
|
||||||
|
|
||||||
FROM base AS run-format
|
|
||||||
RUN --mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn run format
|
|
||||||
|
|
||||||
FROM scratch AS format
|
|
||||||
COPY --from=run-format /src/src/*.ts /src/
|
|
||||||
|
|
||||||
FROM base AS validate-format
|
|
||||||
RUN --mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn run format-check
|
|
||||||
|
|
||||||
FROM scratch AS dist
|
|
||||||
COPY --from=build /src/dist/ /dist/
|
|
||||||
|
|
||||||
FROM build AS validate-build
|
|
||||||
RUN status=$(git status --porcelain -- dist); if [ -n "$status" ]; then echo $status; exit 1; fi
|
|
||||||
|
|
||||||
FROM base AS dev
|
|
||||||
ENTRYPOINT ["bash"]
|
|
||||||
@@ -1,15 +1,20 @@
|
|||||||
[](https://github.com/crazy-max/ghaction-docker-buildx-bake/releases/latest)
|
[](https://github.com/docker/bake-action/releases/latest)
|
||||||
[](https://github.com/marketplace/actions/docker-buildx-bake)
|
[](https://github.com/marketplace/actions/docker-buildx-bake)
|
||||||
[](https://github.com/crazy-max/ghaction-docker-buildx-bake/actions?workflow=test)
|
[](https://github.com/docker/bake-action/actions?workflow=test)
|
||||||
[](https://codecov.io/gh/crazy-max/ghaction-docker-buildx-bake)
|
[](https://codecov.io/gh/docker/bake-action)
|
||||||
[](https://github.com/sponsors/crazy-max)
|
|
||||||
[](https://www.paypal.me/crazyws)
|
## :test_tube: Experimental
|
||||||
|
|
||||||
|
This repository is considered **EXPERIMENTAL** and under active development until further notice. It is subject to
|
||||||
|
non-backward compatible changes or removal in any future version so you should [pin to a specific tag/commit](https://docs.github.com/en/actions/creating-actions/about-actions#using-tags-for-release-management)
|
||||||
|
of this action in your workflow (i.e `docker/bake-action@v1.1.3`).
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
GitHub Action to use Docker [Buildx Bake](https://github.com/docker/buildx#buildx-bake-options-target) as a high-level build command.
|
GitHub Action to use Docker [Buildx Bake](https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md)
|
||||||
|
as a high-level build command.
|
||||||
|
|
||||||
If you are interested, [check out](https://git.io/Je09Y) my other :octocat: GitHub Actions!
|

|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -17,20 +22,16 @@ ___
|
|||||||
* [Customizing](#customizing)
|
* [Customizing](#customizing)
|
||||||
* [inputs](#inputs)
|
* [inputs](#inputs)
|
||||||
* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot)
|
* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot)
|
||||||
* [Limitation](#limitation)
|
|
||||||
* [Contributing](#contributing)
|
|
||||||
* [License](#license)
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: ci
|
name: ci
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
|
||||||
branches: master
|
|
||||||
push:
|
push:
|
||||||
branches: master
|
branches:
|
||||||
tags:
|
- 'master'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bake:
|
bake:
|
||||||
@@ -39,9 +40,6 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
-
|
|
||||||
name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v1
|
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
@@ -53,12 +51,8 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build and push
|
||||||
uses: crazy-max/ghaction-docker-buildx-bake@v1
|
uses: docker/bake-action@master
|
||||||
with:
|
with:
|
||||||
files: |
|
|
||||||
./config.hcl
|
|
||||||
targets: |
|
|
||||||
release
|
|
||||||
push: true
|
push: true
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -86,13 +80,13 @@ Following inputs can be used as `step.with` keys
|
|||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
|------------------|----------|------------------------------------|
|
|------------------|----------|------------------------------------|
|
||||||
| `builder` | String | Builder instance (see [setup-buildx](https://github.com/docker/setup-buildx-action) action) |
|
| `builder` | String | Builder instance (see [setup-buildx](https://github.com/docker/setup-buildx-action) action) |
|
||||||
| `files` | List/CSV | List of [bake definition files](https://github.com/docker/buildx#file-definition) |
|
| `files` | List/CSV | List of [bake definition files](https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md#file) |
|
||||||
| `targets` | List/CSV | List of bake targets |
|
| `targets` | List/CSV | List of bake targets |
|
||||||
| `no-cache` | Bool | Do not use cache when building the image (default `false`) |
|
| `no-cache` | Bool | Do not use cache when building the image (default `false`) |
|
||||||
| `pull` | Bool | Always attempt to pull a newer version of the image (default `false`) |
|
| `pull` | Bool | Always attempt to pull a newer version of the image (default `false`) |
|
||||||
| `load` | Bool | Load is a shorthand for `--set=*.output=type=docker` (default `false`) |
|
| `load` | Bool | Load is a shorthand for `--set=*.output=type=docker` (default `false`) |
|
||||||
| `push` | Bool | Push is a shorthand for `--set=*.output=type=registry` (default `false`) |
|
| `push` | Bool | Push is a shorthand for `--set=*.output=type=registry` (default `false`) |
|
||||||
| `set` | List | List of [targets values to override](https://github.com/docker/buildx#--set-targetpatternkeysubkeyvalue) (eg: `targetpattern.key=value`) |
|
| `set` | List | List of [targets values to override](https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md#set) (eg: `targetpattern.key=value`) |
|
||||||
|
|
||||||
## Keep up-to-date with GitHub Dependabot
|
## Keep up-to-date with GitHub Dependabot
|
||||||
|
|
||||||
@@ -109,22 +103,3 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Limitation
|
|
||||||
|
|
||||||
This action is only available for Linux [virtual environments](https://help.github.com/en/articles/virtual-environments-for-github-actions#supported-virtual-environments-and-hardware-resources).
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Want to contribute? Awesome! The most basic way to show your support is to star :star2: the project,
|
|
||||||
or to raise issues :speech_balloon:. If you want to open a pull request, please read the
|
|
||||||
[contributing guidelines](.github/CONTRIBUTING.md).
|
|
||||||
|
|
||||||
You can also support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max) or by
|
|
||||||
making a [Paypal donation](https://www.paypal.me/crazyws) to ensure this journey continues indefinitely!
|
|
||||||
|
|
||||||
Thanks again for your support, it is much appreciated! :pray:
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
MIT. See `LICENSE` for more details.
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import * as os from 'os';
|
||||||
import * as context from '../src/context';
|
import * as context from '../src/context';
|
||||||
|
|
||||||
describe('getInputList', () => {
|
describe('getInputList', () => {
|
||||||
@@ -166,7 +167,28 @@ describe('asyncForEach', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// See: https://github.com/actions/toolkit/blob/master/packages/core/src/core.ts#L67
|
describe('setOutput', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
process.stdout.write = jest.fn();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('setOutput produces the correct command', () => {
|
||||||
|
context.setOutput('some output', 'some value');
|
||||||
|
assertWriteCalls([`::set-output name=some output::some value${os.EOL}`]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('setOutput handles bools', () => {
|
||||||
|
context.setOutput('some output', false);
|
||||||
|
assertWriteCalls([`::set-output name=some output::false${os.EOL}`]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('setOutput handles numbers', () => {
|
||||||
|
context.setOutput('some output', 1.01);
|
||||||
|
assertWriteCalls([`::set-output name=some output::1.01${os.EOL}`]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// See: https://github.com/actions/toolkit/blob/a1b068ec31a042ff1e10a522d8fdf0b8869d53ca/packages/core/src/core.ts#L89
|
||||||
function getInputName(name: string): string {
|
function getInputName(name: string): string {
|
||||||
return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
|
return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
|
||||||
}
|
}
|
||||||
@@ -174,3 +196,11 @@ function getInputName(name: string): string {
|
|||||||
function setInput(name: string, value: string): void {
|
function setInput(name: string, value: string): void {
|
||||||
process.env[getInputName(name)] = value;
|
process.env[getInputName(name)] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Assert that process.stdout.write calls called only with the given arguments.
|
||||||
|
function assertWriteCalls(calls: string[]): void {
|
||||||
|
expect(process.stdout.write).toHaveBeenCalledTimes(calls.length);
|
||||||
|
for (let i = 0; i < calls.length; i++) {
|
||||||
|
expect(process.stdout.write).toHaveBeenNthCalledWith(i + 1, calls[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
|
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
|
||||||
name: "Docker Buildx Bake"
|
name: "Docker Buildx Bake"
|
||||||
description: "GitHub Action to use Docker Buildx Bake as a high-level build command"
|
description: "GitHub Action to use Docker Buildx Bake as a high-level build command"
|
||||||
author: crazy-max
|
author: 'docker'
|
||||||
branding:
|
branding:
|
||||||
icon: 'anchor'
|
icon: 'anchor'
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
|
|||||||
+238
-73
@@ -516,31 +516,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const os = __importStar(__webpack_require__(87));
|
|
||||||
const buildx = __importStar(__webpack_require__(295));
|
const buildx = __importStar(__webpack_require__(295));
|
||||||
const context = __importStar(__webpack_require__(842));
|
const context = __importStar(__webpack_require__(842));
|
||||||
|
const mexec = __importStar(__webpack_require__(757));
|
||||||
const core = __importStar(__webpack_require__(186));
|
const core = __importStar(__webpack_require__(186));
|
||||||
const exec = __importStar(__webpack_require__(514));
|
const exec = __importStar(__webpack_require__(514));
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
if (os.platform() !== 'linux') {
|
core.startGroup(`Docker info`);
|
||||||
core.setFailed('Only supported on linux platform');
|
yield exec.exec('docker', ['version']);
|
||||||
return;
|
yield exec.exec('docker', ['info']);
|
||||||
}
|
core.endGroup();
|
||||||
if (!(yield buildx.isAvailable())) {
|
if (!(yield buildx.isAvailable())) {
|
||||||
core.setFailed(`Buildx is required. See https://github.com/docker/setup-buildx-action to set up buildx.`);
|
core.setFailed(`Docker buildx is required. See https://github.com/docker/setup-buildx-action to set up buildx.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const buildxVersion = yield buildx.getVersion();
|
const bxVersion = yield buildx.getVersion();
|
||||||
core.info(`📣 Buildx version: ${buildxVersion}`);
|
const inputs = yield context.getInputs();
|
||||||
let inputs = yield context.getInputs();
|
const args = yield context.getArgs(inputs, bxVersion);
|
||||||
const args = yield context.getArgs(inputs, buildxVersion);
|
core.startGroup(`Bake definition`);
|
||||||
core.startGroup(`💡 Bake definition`);
|
|
||||||
yield exec.exec('docker', [...args, '--print']);
|
yield exec.exec('docker', [...args, '--print']);
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
core.info(`🏃 Building...`);
|
yield mexec.exec('docker', args).then(res => {
|
||||||
yield exec.exec('docker', args);
|
if (res.stderr.length > 0 && !res.success) {
|
||||||
|
throw new Error(`buildx bake failed with: ${res.stderr.match(/(.*)\s*$/)[0]}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
@@ -1597,6 +1599,25 @@ module.exports = minVersion
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
@@ -1606,14 +1627,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
||||||
result["default"] = mod;
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
||||||
const command_1 = __webpack_require__(241);
|
const command_1 = __webpack_require__(241);
|
||||||
const file_command_1 = __webpack_require__(717);
|
const file_command_1 = __webpack_require__(717);
|
||||||
const utils_1 = __webpack_require__(278);
|
const utils_1 = __webpack_require__(278);
|
||||||
@@ -1680,7 +1695,9 @@ function addPath(inputPath) {
|
|||||||
}
|
}
|
||||||
exports.addPath = addPath;
|
exports.addPath = addPath;
|
||||||
/**
|
/**
|
||||||
* Gets the value of an input. The value is also trimmed.
|
* Gets the value of an input.
|
||||||
|
* Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
|
||||||
|
* Returns an empty string if the value is not defined.
|
||||||
*
|
*
|
||||||
* @param name name of the input to get
|
* @param name name of the input to get
|
||||||
* @param options optional. See InputOptions.
|
* @param options optional. See InputOptions.
|
||||||
@@ -1691,9 +1708,34 @@ function getInput(name, options) {
|
|||||||
if (options && options.required && !val) {
|
if (options && options.required && !val) {
|
||||||
throw new Error(`Input required and not supplied: ${name}`);
|
throw new Error(`Input required and not supplied: ${name}`);
|
||||||
}
|
}
|
||||||
|
if (options && options.trimWhitespace === false) {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
return val.trim();
|
return val.trim();
|
||||||
}
|
}
|
||||||
exports.getInput = getInput;
|
exports.getInput = getInput;
|
||||||
|
/**
|
||||||
|
* Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
|
||||||
|
* Support boolean input list: `true | True | TRUE | false | False | FALSE` .
|
||||||
|
* The return value is also in boolean type.
|
||||||
|
* ref: https://yaml.org/spec/1.2/spec.html#id2804923
|
||||||
|
*
|
||||||
|
* @param name name of the input to get
|
||||||
|
* @param options optional. See InputOptions.
|
||||||
|
* @returns boolean
|
||||||
|
*/
|
||||||
|
function getBooleanInput(name, options) {
|
||||||
|
const trueValue = ['true', 'True', 'TRUE'];
|
||||||
|
const falseValue = ['false', 'False', 'FALSE'];
|
||||||
|
const val = getInput(name, options);
|
||||||
|
if (trueValue.includes(val))
|
||||||
|
return true;
|
||||||
|
if (falseValue.includes(val))
|
||||||
|
return false;
|
||||||
|
throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` +
|
||||||
|
`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
|
||||||
|
}
|
||||||
|
exports.getBooleanInput = getBooleanInput;
|
||||||
/**
|
/**
|
||||||
* Sets the value of an output.
|
* Sets the value of an output.
|
||||||
*
|
*
|
||||||
@@ -1702,6 +1744,7 @@ exports.getInput = getInput;
|
|||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
function setOutput(name, value) {
|
function setOutput(name, value) {
|
||||||
|
process.stdout.write(os.EOL);
|
||||||
command_1.issueCommand('set-output', { name }, value);
|
command_1.issueCommand('set-output', { name }, value);
|
||||||
}
|
}
|
||||||
exports.setOutput = setOutput;
|
exports.setOutput = setOutput;
|
||||||
@@ -1852,14 +1895,27 @@ module.exports = lt
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
result["default"] = mod;
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.issue = exports.issueCommand = void 0;
|
||||||
const os = __importStar(__webpack_require__(87));
|
const os = __importStar(__webpack_require__(87));
|
||||||
const utils_1 = __webpack_require__(278);
|
const utils_1 = __webpack_require__(278);
|
||||||
/**
|
/**
|
||||||
@@ -1941,6 +1997,7 @@ function escapeProperty(s) {
|
|||||||
// We use any as a valid input type
|
// We use any as a valid input type
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.toCommandValue = void 0;
|
||||||
/**
|
/**
|
||||||
* Sanitizes an input into a string so it can be passed into issueCommand safely
|
* Sanitizes an input into a string so it can be passed into issueCommand safely
|
||||||
* @param input input to sanitize into a string
|
* @param input input to sanitize into a string
|
||||||
@@ -3701,14 +3758,27 @@ module.exports = toComparators
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// For internal use, subject to change.
|
// For internal use, subject to change.
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
result["default"] = mod;
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.issueCommand = void 0;
|
||||||
// We use any as a valid input type
|
// We use any as a valid input type
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
const fs = __importStar(__webpack_require__(747));
|
const fs = __importStar(__webpack_require__(747));
|
||||||
@@ -4409,10 +4479,14 @@ additional information.
|
|||||||
const { Transform } = __webpack_require__(413)
|
const { Transform } = __webpack_require__(413)
|
||||||
const ResizeableBuffer = __webpack_require__(942)
|
const ResizeableBuffer = __webpack_require__(942)
|
||||||
|
|
||||||
|
// white space characters
|
||||||
|
// https://en.wikipedia.org/wiki/Whitespace_character
|
||||||
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes#Types
|
||||||
|
// \f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff
|
||||||
const tab = 9
|
const tab = 9
|
||||||
const nl = 10
|
const nl = 10 // \n, 0x0A in hexadecimal, 10 in decimal
|
||||||
const np = 12
|
const np = 12
|
||||||
const cr = 13
|
const cr = 13 // \r, 0x0D in hexadécimal, 13 in decimal
|
||||||
const space = 32
|
const space = 32
|
||||||
const boms = {
|
const boms = {
|
||||||
// Note, the following are equals:
|
// Note, the following are equals:
|
||||||
@@ -4601,6 +4675,27 @@ class Parser extends Transform {
|
|||||||
throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(opts.from_line)}`)
|
throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(opts.from_line)}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Normalize options `ignore_last_delimiters`
|
||||||
|
if(options.ignore_last_delimiters === undefined || options.ignore_last_delimiters === null){
|
||||||
|
options.ignore_last_delimiters = false
|
||||||
|
}else if(typeof options.ignore_last_delimiters === 'number'){
|
||||||
|
options.ignore_last_delimiters = Math.floor(options.ignore_last_delimiters)
|
||||||
|
if(options.ignore_last_delimiters === 0){
|
||||||
|
options.ignore_last_delimiters = false
|
||||||
|
}
|
||||||
|
}else if(typeof options.ignore_last_delimiters !== 'boolean'){
|
||||||
|
throw new CsvError('CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS', [
|
||||||
|
'Invalid option `ignore_last_delimiters`:',
|
||||||
|
'the value must be a boolean value or an integer,',
|
||||||
|
`got ${JSON.stringify(options.ignore_last_delimiters)}`
|
||||||
|
], options)
|
||||||
|
}
|
||||||
|
if(options.ignore_last_delimiters === true && options.columns === false){
|
||||||
|
throw new CsvError('CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS', [
|
||||||
|
'The option `ignore_last_delimiters`',
|
||||||
|
'requires the activation of the `columns` option'
|
||||||
|
], options)
|
||||||
|
}
|
||||||
// Normalize option `info`
|
// Normalize option `info`
|
||||||
if(options.info === undefined || options.info === null || options.info === false){
|
if(options.info === undefined || options.info === null || options.info === false){
|
||||||
options.info = false
|
options.info = false
|
||||||
@@ -4918,7 +5013,7 @@ class Parser extends Transform {
|
|||||||
}
|
}
|
||||||
// Auto discovery of record_delimiter, unix, mac and windows supported
|
// Auto discovery of record_delimiter, unix, mac and windows supported
|
||||||
if(this.state.quoting === false && record_delimiter.length === 0){
|
if(this.state.quoting === false && record_delimiter.length === 0){
|
||||||
const record_delimiterCount = this.__autoDiscoverRowDelimiter(buf, pos)
|
const record_delimiterCount = this.__autoDiscoverRecordDelimiter(buf, pos)
|
||||||
if(record_delimiterCount){
|
if(record_delimiterCount){
|
||||||
record_delimiter = this.options.record_delimiter
|
record_delimiter = this.options.record_delimiter
|
||||||
}
|
}
|
||||||
@@ -4959,12 +5054,12 @@ class Parser extends Transform {
|
|||||||
const isNextChrTrimable = rtrim && this.__isCharTrimable(nextChr)
|
const isNextChrTrimable = rtrim && this.__isCharTrimable(nextChr)
|
||||||
const isNextChrComment = comment !== null && this.__compareBytes(comment, buf, pos+quote.length, nextChr)
|
const isNextChrComment = comment !== null && this.__compareBytes(comment, buf, pos+quote.length, nextChr)
|
||||||
const isNextChrDelimiter = this.__isDelimiter(buf, pos+quote.length, nextChr)
|
const isNextChrDelimiter = this.__isDelimiter(buf, pos+quote.length, nextChr)
|
||||||
const isNextChrRowDelimiter = record_delimiter.length === 0 ? this.__autoDiscoverRowDelimiter(buf, pos+quote.length) : this.__isRecordDelimiter(nextChr, buf, pos+quote.length)
|
const isNextChrRecordDelimiter = record_delimiter.length === 0 ? this.__autoDiscoverRecordDelimiter(buf, pos+quote.length) : this.__isRecordDelimiter(nextChr, buf, pos+quote.length)
|
||||||
// Escape a quote
|
// Escape a quote
|
||||||
// Treat next char as a regular character
|
// Treat next char as a regular character
|
||||||
if(escape !== null && this.__isEscape(buf, pos, chr) && this.__isQuote(buf, pos + escape.length)){
|
if(escape !== null && this.__isEscape(buf, pos, chr) && this.__isQuote(buf, pos + escape.length)){
|
||||||
pos += escape.length - 1
|
pos += escape.length - 1
|
||||||
}else if(!nextChr || isNextChrDelimiter || isNextChrRowDelimiter || isNextChrComment || isNextChrTrimable){
|
}else if(!nextChr || isNextChrDelimiter || isNextChrRecordDelimiter || isNextChrComment || isNextChrTrimable){
|
||||||
this.state.quoting = false
|
this.state.quoting = false
|
||||||
this.state.wasQuoting = true
|
this.state.wasQuoting = true
|
||||||
pos += quote.length - 1
|
pos += quote.length - 1
|
||||||
@@ -4975,7 +5070,7 @@ class Parser extends Transform {
|
|||||||
'Invalid Closing Quote:',
|
'Invalid Closing Quote:',
|
||||||
`got "${String.fromCharCode(nextChr)}"`,
|
`got "${String.fromCharCode(nextChr)}"`,
|
||||||
`at line ${this.info.lines}`,
|
`at line ${this.info.lines}`,
|
||||||
'instead of delimiter, row delimiter, trimable character',
|
'instead of delimiter, record delimiter, trimable character',
|
||||||
'(if activated) or comment',
|
'(if activated) or comment',
|
||||||
], this.options, this.__context())
|
], this.options, this.__context())
|
||||||
)
|
)
|
||||||
@@ -5016,25 +5111,24 @@ class Parser extends Transform {
|
|||||||
this.info.comment_lines++
|
this.info.comment_lines++
|
||||||
// Skip full comment line
|
// Skip full comment line
|
||||||
}else{
|
}else{
|
||||||
|
// Activate records emition if above from_line
|
||||||
|
if(this.state.enabled === false && this.info.lines + (this.state.wasRowDelimiter === true ? 1: 0) >= from_line){
|
||||||
|
this.state.enabled = true
|
||||||
|
this.__resetField()
|
||||||
|
this.__resetRecord()
|
||||||
|
pos += recordDelimiterLength - 1
|
||||||
|
continue
|
||||||
|
}
|
||||||
// Skip if line is empty and skip_empty_lines activated
|
// Skip if line is empty and skip_empty_lines activated
|
||||||
if(skip_empty_lines === true && this.state.wasQuoting === false && this.state.record.length === 0 && this.state.field.length === 0){
|
if(skip_empty_lines === true && this.state.wasQuoting === false && this.state.record.length === 0 && this.state.field.length === 0){
|
||||||
this.info.empty_lines++
|
this.info.empty_lines++
|
||||||
pos += recordDelimiterLength - 1
|
pos += recordDelimiterLength - 1
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// Activate records emition if above from_line
|
const errField = this.__onField()
|
||||||
if(this.state.enabled === false && this.info.lines + (this.state.wasRowDelimiter === true ? 1: 0 ) >= from_line){
|
if(errField !== undefined) return errField
|
||||||
this.state.enabled = true
|
const errRecord = this.__onRecord()
|
||||||
this.__resetField()
|
if(errRecord !== undefined) return errRecord
|
||||||
this.__resetRow()
|
|
||||||
pos += recordDelimiterLength - 1
|
|
||||||
continue
|
|
||||||
}else{
|
|
||||||
const errField = this.__onField()
|
|
||||||
if(errField !== undefined) return errField
|
|
||||||
const errRecord = this.__onRow()
|
|
||||||
if(errRecord !== undefined) return errRecord
|
|
||||||
}
|
|
||||||
if(to !== -1 && this.info.records >= to){
|
if(to !== -1 && this.info.records >= to){
|
||||||
this.state.stop = true
|
this.state.stop = true
|
||||||
this.push(null)
|
this.push(null)
|
||||||
@@ -5107,7 +5201,7 @@ class Parser extends Transform {
|
|||||||
if(this.state.wasQuoting === true || this.state.record.length !== 0 || this.state.field.length !== 0){
|
if(this.state.wasQuoting === true || this.state.record.length !== 0 || this.state.field.length !== 0){
|
||||||
const errField = this.__onField()
|
const errField = this.__onField()
|
||||||
if(errField !== undefined) return errField
|
if(errField !== undefined) return errField
|
||||||
const errRecord = this.__onRow()
|
const errRecord = this.__onRecord()
|
||||||
if(errRecord !== undefined) return errRecord
|
if(errRecord !== undefined) return errRecord
|
||||||
}else if(this.state.wasRowDelimiter === true){
|
}else if(this.state.wasRowDelimiter === true){
|
||||||
this.info.empty_lines++
|
this.info.empty_lines++
|
||||||
@@ -5123,21 +5217,17 @@ class Parser extends Transform {
|
|||||||
this.state.wasRowDelimiter = false
|
this.state.wasRowDelimiter = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Helper to test if a character is a space or a line delimiter
|
__onRecord(){
|
||||||
__isCharTrimable(chr){
|
|
||||||
return chr === space || chr === tab || chr === cr || chr === nl || chr === np
|
|
||||||
}
|
|
||||||
__onRow(){
|
|
||||||
const {columns, columns_duplicates_to_array, encoding, info, from, relax_column_count, relax_column_count_less, relax_column_count_more, raw, skip_lines_with_empty_values} = this.options
|
const {columns, columns_duplicates_to_array, encoding, info, from, relax_column_count, relax_column_count_less, relax_column_count_more, raw, skip_lines_with_empty_values} = this.options
|
||||||
const {enabled, record} = this.state
|
const {enabled, record} = this.state
|
||||||
if(enabled === false){
|
if(enabled === false){
|
||||||
return this.__resetRow()
|
return this.__resetRecord()
|
||||||
}
|
}
|
||||||
// Convert the first line into column names
|
// Convert the first line into column names
|
||||||
const recordLength = record.length
|
const recordLength = record.length
|
||||||
if(columns === true){
|
if(columns === true){
|
||||||
if(isRecordEmpty(record)){
|
if(isRecordEmpty(record)){
|
||||||
this.__resetRow()
|
this.__resetRecord()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return this.__firstLineToColumns(record)
|
return this.__firstLineToColumns(record)
|
||||||
@@ -5179,12 +5269,12 @@ class Parser extends Transform {
|
|||||||
}
|
}
|
||||||
if(skip_lines_with_empty_values === true){
|
if(skip_lines_with_empty_values === true){
|
||||||
if(isRecordEmpty(record)){
|
if(isRecordEmpty(record)){
|
||||||
this.__resetRow()
|
this.__resetRecord()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.state.recordHasError === true){
|
if(this.state.recordHasError === true){
|
||||||
this.__resetRow()
|
this.__resetRecord()
|
||||||
this.state.recordHasError = false
|
this.state.recordHasError = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -5196,7 +5286,7 @@ class Parser extends Transform {
|
|||||||
for(let i = 0, l = record.length; i < l; i++){
|
for(let i = 0, l = record.length; i < l; i++){
|
||||||
if(columns[i] === undefined || columns[i].disabled) continue
|
if(columns[i] === undefined || columns[i].disabled) continue
|
||||||
// Turn duplicate columns into an array
|
// Turn duplicate columns into an array
|
||||||
if (columns_duplicates_to_array === true && obj[columns[i].name]) {
|
if (columns_duplicates_to_array === true && obj[columns[i].name] !== undefined) {
|
||||||
if (Array.isArray(obj[columns[i].name])) {
|
if (Array.isArray(obj[columns[i].name])) {
|
||||||
obj[columns[i].name] = obj[columns[i].name].concat(record[i])
|
obj[columns[i].name] = obj[columns[i].name].concat(record[i])
|
||||||
} else {
|
} else {
|
||||||
@@ -5258,7 +5348,7 @@ class Parser extends Transform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.__resetRow()
|
this.__resetRecord()
|
||||||
}
|
}
|
||||||
__firstLineToColumns(record){
|
__firstLineToColumns(record){
|
||||||
const {firstLineToHeaders} = this.state
|
const {firstLineToHeaders} = this.state
|
||||||
@@ -5278,13 +5368,13 @@ class Parser extends Transform {
|
|||||||
const normalizedHeaders = normalizeColumnsArray(headers)
|
const normalizedHeaders = normalizeColumnsArray(headers)
|
||||||
this.state.expectedRecordLength = normalizedHeaders.length
|
this.state.expectedRecordLength = normalizedHeaders.length
|
||||||
this.options.columns = normalizedHeaders
|
this.options.columns = normalizedHeaders
|
||||||
this.__resetRow()
|
this.__resetRecord()
|
||||||
return
|
return
|
||||||
}catch(err){
|
}catch(err){
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
__resetRow(){
|
__resetRecord(){
|
||||||
if(this.options.raw === true){
|
if(this.options.raw === true){
|
||||||
this.state.rawBuffer.reset()
|
this.state.rawBuffer.reset()
|
||||||
}
|
}
|
||||||
@@ -5357,6 +5447,10 @@ class Parser extends Transform {
|
|||||||
}
|
}
|
||||||
return [undefined, field]
|
return [undefined, field]
|
||||||
}
|
}
|
||||||
|
// Helper to test if a character is a space or a line delimiter
|
||||||
|
__isCharTrimable(chr){
|
||||||
|
return chr === space || chr === tab || chr === cr || chr === nl || chr === np
|
||||||
|
}
|
||||||
// Keep it in case we implement the `cast_int` option
|
// Keep it in case we implement the `cast_int` option
|
||||||
// __isInt(value){
|
// __isInt(value){
|
||||||
// // return Number.isInteger(parseInt(value))
|
// // return Number.isInteger(parseInt(value))
|
||||||
@@ -5383,14 +5477,19 @@ class Parser extends Transform {
|
|||||||
needMoreDataSize,
|
needMoreDataSize,
|
||||||
// Skip if the remaining buffer smaller than record delimiter
|
// Skip if the remaining buffer smaller than record delimiter
|
||||||
recordDelimiterMaxLength,
|
recordDelimiterMaxLength,
|
||||||
// Skip if the remaining buffer can be row delimiter following the closing quote
|
// Skip if the remaining buffer can be record delimiter following the closing quote
|
||||||
// 1 is for quote.length
|
// 1 is for quote.length
|
||||||
quoting ? (quote.length + recordDelimiterMaxLength) : 0,
|
quoting ? (quote.length + recordDelimiterMaxLength) : 0,
|
||||||
)
|
)
|
||||||
return numOfCharLeft < requiredLength
|
return numOfCharLeft < requiredLength
|
||||||
}
|
}
|
||||||
__isDelimiter(buf, pos, chr){
|
__isDelimiter(buf, pos, chr){
|
||||||
const {delimiter} = this.options
|
const {delimiter, ignore_last_delimiters} = this.options
|
||||||
|
if(ignore_last_delimiters === true && this.state.record.length === this.options.columns.length - 1){
|
||||||
|
return 0
|
||||||
|
}else if(ignore_last_delimiters !== false && typeof ignore_last_delimiters === 'number' && this.state.record.length === ignore_last_delimiters - 1){
|
||||||
|
return 0
|
||||||
|
}
|
||||||
loop1: for(let i = 0; i < delimiter.length; i++){
|
loop1: for(let i = 0; i < delimiter.length; i++){
|
||||||
const del = delimiter[i]
|
const del = delimiter[i]
|
||||||
if(del[0] === chr){
|
if(del[0] === chr){
|
||||||
@@ -5445,7 +5544,7 @@ class Parser extends Transform {
|
|||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
__autoDiscoverRowDelimiter(buf, pos){
|
__autoDiscoverRecordDelimiter(buf, pos){
|
||||||
const {encoding} = this.options
|
const {encoding} = this.options
|
||||||
const chr = buf[pos]
|
const chr = buf[pos]
|
||||||
if(chr === cr){
|
if(chr === cr){
|
||||||
@@ -5687,19 +5786,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.asyncForEach = exports.getInputList = exports.getArgs = exports.getInputs = void 0;
|
exports.setOutput = exports.asyncForEach = exports.getInputList = exports.getArgs = exports.getInputs = void 0;
|
||||||
const sync_1 = __importDefault(__webpack_require__(750));
|
const sync_1 = __importDefault(__webpack_require__(750));
|
||||||
const core = __importStar(__webpack_require__(186));
|
const core = __importStar(__webpack_require__(186));
|
||||||
|
const command_1 = __webpack_require__(241);
|
||||||
function getInputs() {
|
function getInputs() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return {
|
return {
|
||||||
builder: core.getInput('builder'),
|
builder: core.getInput('builder'),
|
||||||
files: getInputList('files'),
|
files: getInputList('files'),
|
||||||
targets: getInputList('targets'),
|
targets: getInputList('targets'),
|
||||||
noCache: /true/i.test(core.getInput('no-cache')),
|
noCache: core.getBooleanInput('no-cache'),
|
||||||
pull: /true/i.test(core.getInput('pull')),
|
pull: core.getBooleanInput('pull'),
|
||||||
load: /true/i.test(core.getInput('load')),
|
load: core.getBooleanInput('load'),
|
||||||
push: /true/i.test(core.getInput('push')),
|
push: core.getBooleanInput('push'),
|
||||||
set: getInputList('set', true)
|
set: getInputList('set', true)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -5777,6 +5877,11 @@ exports.asyncForEach = (array, callback) => __awaiter(void 0, void 0, void 0, fu
|
|||||||
yield callback(array[index], index, array);
|
yield callback(array[index], index, array);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// FIXME: Temp fix https://github.com/actions/toolkit/issues/777
|
||||||
|
function setOutput(name, value) {
|
||||||
|
command_1.issueCommand('set-output', { name }, value);
|
||||||
|
}
|
||||||
|
exports.setOutput = setOutput;
|
||||||
//# sourceMappingURL=context.js.map
|
//# sourceMappingURL=context.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -5798,22 +5903,30 @@ module.exports = clean
|
|||||||
/***/ (function(module, __unusedexports, __webpack_require__) {
|
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||||
|
|
||||||
const Range = __webpack_require__(828)
|
const Range = __webpack_require__(828)
|
||||||
const { ANY } = __webpack_require__(532)
|
const Comparator = __webpack_require__(532)
|
||||||
|
const { ANY } = Comparator
|
||||||
const satisfies = __webpack_require__(55)
|
const satisfies = __webpack_require__(55)
|
||||||
const compare = __webpack_require__(309)
|
const compare = __webpack_require__(309)
|
||||||
|
|
||||||
// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
|
// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
|
||||||
// - Every simple range `r1, r2, ...` is a subset of some `R1, R2, ...`
|
// - Every simple range `r1, r2, ...` is a null set, OR
|
||||||
|
// - Every simple range `r1, r2, ...` which is not a null set is a subset of
|
||||||
|
// some `R1, R2, ...`
|
||||||
//
|
//
|
||||||
// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
|
// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
|
||||||
// - If c is only the ANY comparator
|
// - If c is only the ANY comparator
|
||||||
// - If C is only the ANY comparator, return true
|
// - If C is only the ANY comparator, return true
|
||||||
// - Else return false
|
// - Else if in prerelease mode, return false
|
||||||
|
// - else replace c with `[>=0.0.0]`
|
||||||
|
// - If C is only the ANY comparator
|
||||||
|
// - if in prerelease mode, return true
|
||||||
|
// - else replace C with `[>=0.0.0]`
|
||||||
// - Let EQ be the set of = comparators in c
|
// - Let EQ be the set of = comparators in c
|
||||||
// - If EQ is more than one, return true (null set)
|
// - If EQ is more than one, return true (null set)
|
||||||
// - Let GT be the highest > or >= comparator in c
|
// - Let GT be the highest > or >= comparator in c
|
||||||
// - Let LT be the lowest < or <= comparator in c
|
// - Let LT be the lowest < or <= comparator in c
|
||||||
// - If GT and LT, and GT.semver > LT.semver, return true (null set)
|
// - If GT and LT, and GT.semver > LT.semver, return true (null set)
|
||||||
|
// - If any C is a = range, and GT or LT are set, return false
|
||||||
// - If EQ
|
// - If EQ
|
||||||
// - If GT, and EQ does not satisfy GT, return true (null set)
|
// - If GT, and EQ does not satisfy GT, return true (null set)
|
||||||
// - If LT, and EQ does not satisfy LT, return true (null set)
|
// - If LT, and EQ does not satisfy LT, return true (null set)
|
||||||
@@ -5822,13 +5935,16 @@ const compare = __webpack_require__(309)
|
|||||||
// - If GT
|
// - If GT
|
||||||
// - If GT.semver is lower than any > or >= comp in C, return false
|
// - If GT.semver is lower than any > or >= comp in C, return false
|
||||||
// - If GT is >=, and GT.semver does not satisfy every C, return false
|
// - If GT is >=, and GT.semver does not satisfy every C, return false
|
||||||
|
// - If GT.semver has a prerelease, and not in prerelease mode
|
||||||
|
// - If no C has a prerelease and the GT.semver tuple, return false
|
||||||
// - If LT
|
// - If LT
|
||||||
// - If LT.semver is greater than any < or <= comp in C, return false
|
// - If LT.semver is greater than any < or <= comp in C, return false
|
||||||
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
||||||
// - If any C is a = range, and GT or LT are set, return false
|
// - If GT.semver has a prerelease, and not in prerelease mode
|
||||||
|
// - If no C has a prerelease and the LT.semver tuple, return false
|
||||||
// - Else return true
|
// - Else return true
|
||||||
|
|
||||||
const subset = (sub, dom, options) => {
|
const subset = (sub, dom, options = {}) => {
|
||||||
if (sub === dom)
|
if (sub === dom)
|
||||||
return true
|
return true
|
||||||
|
|
||||||
@@ -5857,8 +5973,21 @@ const simpleSubset = (sub, dom, options) => {
|
|||||||
if (sub === dom)
|
if (sub === dom)
|
||||||
return true
|
return true
|
||||||
|
|
||||||
if (sub.length === 1 && sub[0].semver === ANY)
|
if (sub.length === 1 && sub[0].semver === ANY) {
|
||||||
return dom.length === 1 && dom[0].semver === ANY
|
if (dom.length === 1 && dom[0].semver === ANY)
|
||||||
|
return true
|
||||||
|
else if (options.includePrerelease)
|
||||||
|
sub = [ new Comparator('>=0.0.0-0') ]
|
||||||
|
else
|
||||||
|
sub = [ new Comparator('>=0.0.0') ]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dom.length === 1 && dom[0].semver === ANY) {
|
||||||
|
if (options.includePrerelease)
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
dom = [ new Comparator('>=0.0.0') ]
|
||||||
|
}
|
||||||
|
|
||||||
const eqSet = new Set()
|
const eqSet = new Set()
|
||||||
let gt, lt
|
let gt, lt
|
||||||
@@ -5901,10 +6030,32 @@ const simpleSubset = (sub, dom, options) => {
|
|||||||
|
|
||||||
let higher, lower
|
let higher, lower
|
||||||
let hasDomLT, hasDomGT
|
let hasDomLT, hasDomGT
|
||||||
|
// if the subset has a prerelease, we need a comparator in the superset
|
||||||
|
// with the same tuple and a prerelease, or it's not a subset
|
||||||
|
let needDomLTPre = lt &&
|
||||||
|
!options.includePrerelease &&
|
||||||
|
lt.semver.prerelease.length ? lt.semver : false
|
||||||
|
let needDomGTPre = gt &&
|
||||||
|
!options.includePrerelease &&
|
||||||
|
gt.semver.prerelease.length ? gt.semver : false
|
||||||
|
// exception: <1.2.3-0 is the same as <1.2.3
|
||||||
|
if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
|
||||||
|
lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
|
||||||
|
needDomLTPre = false
|
||||||
|
}
|
||||||
|
|
||||||
for (const c of dom) {
|
for (const c of dom) {
|
||||||
hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
|
hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
|
||||||
hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
|
hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
|
||||||
if (gt) {
|
if (gt) {
|
||||||
|
if (needDomGTPre) {
|
||||||
|
if (c.semver.prerelease && c.semver.prerelease.length &&
|
||||||
|
c.semver.major === needDomGTPre.major &&
|
||||||
|
c.semver.minor === needDomGTPre.minor &&
|
||||||
|
c.semver.patch === needDomGTPre.patch) {
|
||||||
|
needDomGTPre = false
|
||||||
|
}
|
||||||
|
}
|
||||||
if (c.operator === '>' || c.operator === '>=') {
|
if (c.operator === '>' || c.operator === '>=') {
|
||||||
higher = higherGT(gt, c, options)
|
higher = higherGT(gt, c, options)
|
||||||
if (higher === c && higher !== gt)
|
if (higher === c && higher !== gt)
|
||||||
@@ -5913,6 +6064,14 @@ const simpleSubset = (sub, dom, options) => {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (lt) {
|
if (lt) {
|
||||||
|
if (needDomLTPre) {
|
||||||
|
if (c.semver.prerelease && c.semver.prerelease.length &&
|
||||||
|
c.semver.major === needDomLTPre.major &&
|
||||||
|
c.semver.minor === needDomLTPre.minor &&
|
||||||
|
c.semver.patch === needDomLTPre.patch) {
|
||||||
|
needDomLTPre = false
|
||||||
|
}
|
||||||
|
}
|
||||||
if (c.operator === '<' || c.operator === '<=') {
|
if (c.operator === '<' || c.operator === '<=') {
|
||||||
lower = lowerLT(lt, c, options)
|
lower = lowerLT(lt, c, options)
|
||||||
if (lower === c && lower !== lt)
|
if (lower === c && lower !== lt)
|
||||||
@@ -5933,6 +6092,12 @@ const simpleSubset = (sub, dom, options) => {
|
|||||||
if (lt && hasDomGT && !gt && gtltComp !== 0)
|
if (lt && hasDomGT && !gt && gtltComp !== 0)
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
// we needed a prerelease range in a specific tuple, but didn't get one
|
||||||
|
// then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
|
||||||
|
// because it includes prereleases in the 1.2.3 tuple
|
||||||
|
if (needDomGTPre || needDomLTPre)
|
||||||
|
return false
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+42
-29
@@ -1,54 +1,67 @@
|
|||||||
|
variable "NODE_VERSION" {
|
||||||
|
default = "12"
|
||||||
|
}
|
||||||
|
|
||||||
|
target "node-version" {
|
||||||
|
args = {
|
||||||
|
NODE_VERSION = NODE_VERSION
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
group "default" {
|
group "default" {
|
||||||
targets = ["build"]
|
targets = ["build"]
|
||||||
}
|
}
|
||||||
|
|
||||||
group "pre-checkin" {
|
group "pre-checkin" {
|
||||||
targets = ["update-yarn", "format", "build"]
|
targets = ["vendor-update", "format", "build"]
|
||||||
}
|
}
|
||||||
|
|
||||||
group "validate" {
|
group "validate" {
|
||||||
targets = ["validate-format", "validate-build", "validate-yarn"]
|
targets = ["format-validate", "build-validate", "vendor-validate"]
|
||||||
}
|
|
||||||
|
|
||||||
target "dockerfile" {
|
|
||||||
dockerfile = "Dockerfile.dev"
|
|
||||||
}
|
|
||||||
|
|
||||||
target "update-yarn" {
|
|
||||||
inherits = ["dockerfile"]
|
|
||||||
target = "update-yarn"
|
|
||||||
output = ["."]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
target "build" {
|
target "build" {
|
||||||
inherits = ["dockerfile"]
|
inherits = ["node-version"]
|
||||||
target = "dist"
|
dockerfile = "./hack/build.Dockerfile"
|
||||||
|
target = "build-update"
|
||||||
output = ["."]
|
output = ["."]
|
||||||
}
|
}
|
||||||
|
|
||||||
target "test" {
|
target "build-validate" {
|
||||||
inherits = ["dockerfile"]
|
inherits = ["node-version"]
|
||||||
target = "test-coverage"
|
dockerfile = "./hack/build.Dockerfile"
|
||||||
output = ["."]
|
target = "build-validate"
|
||||||
}
|
}
|
||||||
|
|
||||||
target "format" {
|
target "format" {
|
||||||
inherits = ["dockerfile"]
|
inherits = ["node-version"]
|
||||||
target = "format"
|
dockerfile = "./hack/build.Dockerfile"
|
||||||
|
target = "format-update"
|
||||||
output = ["."]
|
output = ["."]
|
||||||
}
|
}
|
||||||
|
|
||||||
target "validate-format" {
|
target "format-validate" {
|
||||||
inherits = ["dockerfile"]
|
inherits = ["node-version"]
|
||||||
target = "validate-format"
|
dockerfile = "./hack/build.Dockerfile"
|
||||||
|
target = "format-validate"
|
||||||
}
|
}
|
||||||
|
|
||||||
target "validate-build" {
|
target "vendor-update" {
|
||||||
inherits = ["dockerfile"]
|
inherits = ["node-version"]
|
||||||
target = "validate-build"
|
dockerfile = "./hack/vendor.Dockerfile"
|
||||||
|
target = "update"
|
||||||
|
output = ["."]
|
||||||
}
|
}
|
||||||
|
|
||||||
target "validate-yarn" {
|
target "vendor-validate" {
|
||||||
inherits = ["dockerfile"]
|
inherits = ["node-version"]
|
||||||
target = "validate-yarn"
|
dockerfile = "./hack/vendor.Dockerfile"
|
||||||
|
target = "validate"
|
||||||
|
}
|
||||||
|
|
||||||
|
target "test" {
|
||||||
|
inherits = ["node-version"]
|
||||||
|
dockerfile = "./hack/test.Dockerfile"
|
||||||
|
target = "test-coverage"
|
||||||
|
output = ["./coverage"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 \
|
||||||
@@ -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 deps
|
||||||
|
RUN --mount=type=bind,target=.,rw \
|
||||||
|
--mount=type=cache,target=/src/node_modules \
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
FROM deps AS test
|
||||||
|
ENV RUNNER_TEMP=/tmp/github_runner
|
||||||
|
ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
|
||||||
|
RUN --mount=type=bind,target=.,rw \
|
||||||
|
--mount=type=cache,target=/src/node_modules \
|
||||||
|
--mount=type=bind,from=crazymax/docker,source=/usr/libexec/docker/cli-plugins/docker-buildx,target=/usr/libexec/docker/cli-plugins/docker-buildx \
|
||||||
|
--mount=type=bind,from=crazymax/docker,source=/usr/local/bin/docker,target=/usr/bin/docker \
|
||||||
|
yarn run test --coverageDirectory=/tmp/coverage
|
||||||
|
|
||||||
|
FROM scratch AS test-coverage
|
||||||
|
COPY --from=test /tmp/coverage /
|
||||||
@@ -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
|
||||||
+5
-7
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/crazy-max/ghaction-docker-buildx-bake.git"
|
"url": "git+https://github.com/docker/bake-action.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"actions",
|
"actions",
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
"buildx",
|
"buildx",
|
||||||
"bake"
|
"bake"
|
||||||
],
|
],
|
||||||
"author": "CrazyMax",
|
"author": "Docker",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
{
|
{
|
||||||
"name": "CrazyMax",
|
"name": "CrazyMax",
|
||||||
@@ -28,12 +28,10 @@
|
|||||||
],
|
],
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.3.0",
|
||||||
"@actions/exec": "^1.0.4",
|
"@actions/exec": "^1.0.4",
|
||||||
"@actions/github": "^4.0.0",
|
"csv-parse": "^4.15.4",
|
||||||
"csv-parse": "^4.14.2",
|
"semver": "^7.3.5"
|
||||||
"semver": "^7.3.4",
|
|
||||||
"tmp": "^0.2.1"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^26.0.3",
|
"@types/jest": "^26.0.3",
|
||||||
|
|||||||
+10
-4
@@ -1,6 +1,7 @@
|
|||||||
import csvparse from 'csv-parse/lib/sync';
|
import csvparse from 'csv-parse/lib/sync';
|
||||||
import * as buildx from './buildx';
|
import * as buildx from './buildx';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
|
import {issueCommand} from '@actions/core/lib/command';
|
||||||
|
|
||||||
export interface Inputs {
|
export interface Inputs {
|
||||||
builder: string;
|
builder: string;
|
||||||
@@ -18,10 +19,10 @@ export async function getInputs(): Promise<Inputs> {
|
|||||||
builder: core.getInput('builder'),
|
builder: core.getInput('builder'),
|
||||||
files: getInputList('files'),
|
files: getInputList('files'),
|
||||||
targets: getInputList('targets'),
|
targets: getInputList('targets'),
|
||||||
noCache: /true/i.test(core.getInput('no-cache')),
|
noCache: core.getBooleanInput('no-cache'),
|
||||||
pull: /true/i.test(core.getInput('pull')),
|
pull: core.getBooleanInput('pull'),
|
||||||
load: /true/i.test(core.getInput('load')),
|
load: core.getBooleanInput('load'),
|
||||||
push: /true/i.test(core.getInput('push')),
|
push: core.getBooleanInput('push'),
|
||||||
set: getInputList('set', true)
|
set: getInputList('set', true)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -96,3 +97,8 @@ export const asyncForEach = async (array, callback) => {
|
|||||||
await callback(array[index], index, array);
|
await callback(array[index], index, array);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME: Temp fix https://github.com/actions/toolkit/issues/777
|
||||||
|
export function setOutput(name: string, value: any): void {
|
||||||
|
issueCommand('set-output', {name}, value);
|
||||||
|
}
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ export interface ExecResult {
|
|||||||
stderr: string;
|
stderr: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const exec = async (command: string, args: string[] = [], silent: boolean): Promise<ExecResult> => {
|
export const exec = async (command: string, args: string[] = [], silent?: boolean): Promise<ExecResult> => {
|
||||||
let stdout: string = '';
|
let stdout: string = '';
|
||||||
let stderr: string = '';
|
let stderr: string = '';
|
||||||
|
|
||||||
|
|||||||
+15
-14
@@ -1,33 +1,34 @@
|
|||||||
import * as os from 'os';
|
|
||||||
import * as buildx from './buildx';
|
import * as buildx from './buildx';
|
||||||
import * as context from './context';
|
import * as context from './context';
|
||||||
|
import * as mexec from './exec';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
if (os.platform() !== 'linux') {
|
core.startGroup(`Docker info`);
|
||||||
core.setFailed('Only supported on linux platform');
|
await exec.exec('docker', ['version']);
|
||||||
return;
|
await exec.exec('docker', ['info']);
|
||||||
}
|
core.endGroup();
|
||||||
|
|
||||||
if (!(await buildx.isAvailable())) {
|
if (!(await buildx.isAvailable())) {
|
||||||
core.setFailed(`Buildx is required. See https://github.com/docker/setup-buildx-action to set up buildx.`);
|
core.setFailed(`Docker buildx is required. See https://github.com/docker/setup-buildx-action to set up buildx.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const buildxVersion = await buildx.getVersion();
|
const bxVersion = await buildx.getVersion();
|
||||||
core.info(`📣 Buildx version: ${buildxVersion}`);
|
const inputs: context.Inputs = await context.getInputs();
|
||||||
|
const args: string[] = await context.getArgs(inputs, bxVersion);
|
||||||
|
|
||||||
let inputs: context.Inputs = await context.getInputs();
|
core.startGroup(`Bake definition`);
|
||||||
const args: string[] = await context.getArgs(inputs, buildxVersion);
|
|
||||||
|
|
||||||
core.startGroup(`💡 Bake definition`);
|
|
||||||
await exec.exec('docker', [...args, '--print']);
|
await exec.exec('docker', [...args, '--print']);
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
|
|
||||||
core.info(`🏃 Building...`);
|
await mexec.exec('docker', args).then(res => {
|
||||||
await exec.exec('docker', args);
|
if (res.stderr.length > 0 && !res.success) {
|
||||||
|
throw new Error(`buildx bake failed with: ${res.stderr.match(/(.*)\s*$/)![0]}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@actions/core@^1.2.6":
|
"@actions/core@^1.3.0":
|
||||||
version "1.2.6"
|
version "1.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.2.6.tgz#a78d49f41a4def18e88ce47c2cac615d5694bf09"
|
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.3.0.tgz#f5e4b24c889e7f2e58b466cc8c7481292284eba0"
|
||||||
integrity sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==
|
integrity sha512-xxtX0Cwdhb8LcgatfJkokqT8KzPvcIbwL9xpLU09nOwBzaStbfm0dNncsP0M4us+EpoPdWy7vbzU5vSOH7K6pg==
|
||||||
|
|
||||||
"@actions/exec@^1.0.4":
|
"@actions/exec@^1.0.4":
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
@@ -14,23 +14,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@actions/io" "^1.0.1"
|
"@actions/io" "^1.0.1"
|
||||||
|
|
||||||
"@actions/github@^4.0.0":
|
|
||||||
version "4.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@actions/github/-/github-4.0.0.tgz#d520483151a2bf5d2dc9cd0f20f9ac3a2e458816"
|
|
||||||
integrity sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==
|
|
||||||
dependencies:
|
|
||||||
"@actions/http-client" "^1.0.8"
|
|
||||||
"@octokit/core" "^3.0.0"
|
|
||||||
"@octokit/plugin-paginate-rest" "^2.2.3"
|
|
||||||
"@octokit/plugin-rest-endpoint-methods" "^4.0.0"
|
|
||||||
|
|
||||||
"@actions/http-client@^1.0.8":
|
|
||||||
version "1.0.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-1.0.8.tgz#8bd76e8eca89dc8bcf619aa128eba85f7a39af45"
|
|
||||||
integrity sha512-G4JjJ6f9Hb3Zvejj+ewLLKLf99ZC+9v+yCxoYf9vSyH+WkzPLB2LuUtRMGNkooMqdugGBFStIKXOuvH1W+EctA==
|
|
||||||
dependencies:
|
|
||||||
tunnel "0.0.6"
|
|
||||||
|
|
||||||
"@actions/io@^1.0.1":
|
"@actions/io@^1.0.1":
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/@actions/io/-/io-1.0.2.tgz#2f614b6e69ce14d191180451eb38e6576a6e6b27"
|
resolved "https://registry.yarnpkg.com/@actions/io/-/io-1.0.2.tgz#2f614b6e69ce14d191180451eb38e6576a6e6b27"
|
||||||
@@ -502,88 +485,6 @@
|
|||||||
"@types/yargs" "^15.0.0"
|
"@types/yargs" "^15.0.0"
|
||||||
chalk "^4.0.0"
|
chalk "^4.0.0"
|
||||||
|
|
||||||
"@octokit/auth-token@^2.4.0":
|
|
||||||
version "2.4.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a"
|
|
||||||
integrity sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ==
|
|
||||||
dependencies:
|
|
||||||
"@octokit/types" "^5.0.0"
|
|
||||||
|
|
||||||
"@octokit/core@^3.0.0":
|
|
||||||
version "3.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.1.2.tgz#c937d5f9621b764573068fcd2e5defcc872fd9cc"
|
|
||||||
integrity sha512-AInOFULmwOa7+NFi9F8DlDkm5qtZVmDQayi7TUgChE3yeIGPq0Y+6cAEXPexQ3Ea+uZy66hKEazR7DJyU+4wfw==
|
|
||||||
dependencies:
|
|
||||||
"@octokit/auth-token" "^2.4.0"
|
|
||||||
"@octokit/graphql" "^4.3.1"
|
|
||||||
"@octokit/request" "^5.4.0"
|
|
||||||
"@octokit/types" "^5.0.0"
|
|
||||||
before-after-hook "^2.1.0"
|
|
||||||
universal-user-agent "^6.0.0"
|
|
||||||
|
|
||||||
"@octokit/endpoint@^6.0.1":
|
|
||||||
version "6.0.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.8.tgz#91b07e236fdb69929c678c6439f7a560dc6058ac"
|
|
||||||
integrity sha512-MuRrgv+bM4Q+e9uEvxAB/Kf+Sj0O2JAOBA131uo1o6lgdq1iS8ejKwtqHgdfY91V3rN9R/hdGKFiQYMzVzVBEQ==
|
|
||||||
dependencies:
|
|
||||||
"@octokit/types" "^5.0.0"
|
|
||||||
is-plain-object "^5.0.0"
|
|
||||||
universal-user-agent "^6.0.0"
|
|
||||||
|
|
||||||
"@octokit/graphql@^4.3.1":
|
|
||||||
version "4.5.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.5.6.tgz#708143ba15cf7c1879ed6188266e7f270be805d4"
|
|
||||||
integrity sha512-Rry+unqKTa3svswT2ZAuqenpLrzJd+JTv89LTeVa5UM/5OX8o4KTkPL7/1ABq4f/ZkELb0XEK/2IEoYwykcLXg==
|
|
||||||
dependencies:
|
|
||||||
"@octokit/request" "^5.3.0"
|
|
||||||
"@octokit/types" "^5.0.0"
|
|
||||||
universal-user-agent "^6.0.0"
|
|
||||||
|
|
||||||
"@octokit/plugin-paginate-rest@^2.2.3":
|
|
||||||
version "2.4.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.4.0.tgz#92f951ddc8a1cd505353fa07650752ca25ed7e93"
|
|
||||||
integrity sha512-YT6Klz3LLH6/nNgi0pheJnUmTFW4kVnxGft+v8Itc41IIcjl7y1C8TatmKQBbCSuTSNFXO5pCENnqg6sjwpJhg==
|
|
||||||
dependencies:
|
|
||||||
"@octokit/types" "^5.5.0"
|
|
||||||
|
|
||||||
"@octokit/plugin-rest-endpoint-methods@^4.0.0":
|
|
||||||
version "4.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.0.tgz#c5a0691b3aba5d8b4ef5dffd6af3649608f167ba"
|
|
||||||
integrity sha512-1/qn1q1C1hGz6W/iEDm9DoyNoG/xdFDt78E3eZ5hHeUfJTLJgyAMdj9chL/cNBHjcjd+FH5aO1x0VCqR2RE0mw==
|
|
||||||
dependencies:
|
|
||||||
"@octokit/types" "^5.5.0"
|
|
||||||
deprecation "^2.3.1"
|
|
||||||
|
|
||||||
"@octokit/request-error@^2.0.0":
|
|
||||||
version "2.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.2.tgz#0e76b83f5d8fdda1db99027ea5f617c2e6ba9ed0"
|
|
||||||
integrity sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw==
|
|
||||||
dependencies:
|
|
||||||
"@octokit/types" "^5.0.1"
|
|
||||||
deprecation "^2.0.0"
|
|
||||||
once "^1.4.0"
|
|
||||||
|
|
||||||
"@octokit/request@^5.3.0", "@octokit/request@^5.4.0":
|
|
||||||
version "5.4.9"
|
|
||||||
resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.9.tgz#0a46f11b82351b3416d3157261ad9b1558c43365"
|
|
||||||
integrity sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA==
|
|
||||||
dependencies:
|
|
||||||
"@octokit/endpoint" "^6.0.1"
|
|
||||||
"@octokit/request-error" "^2.0.0"
|
|
||||||
"@octokit/types" "^5.0.0"
|
|
||||||
deprecation "^2.0.0"
|
|
||||||
is-plain-object "^5.0.0"
|
|
||||||
node-fetch "^2.6.1"
|
|
||||||
once "^1.4.0"
|
|
||||||
universal-user-agent "^6.0.0"
|
|
||||||
|
|
||||||
"@octokit/types@^5.0.0", "@octokit/types@^5.0.1", "@octokit/types@^5.5.0":
|
|
||||||
version "5.5.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.5.0.tgz#e5f06e8db21246ca102aa28444cdb13ae17a139b"
|
|
||||||
integrity sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ==
|
|
||||||
dependencies:
|
|
||||||
"@types/node" ">= 8"
|
|
||||||
|
|
||||||
"@sinonjs/commons@^1.7.0":
|
"@sinonjs/commons@^1.7.0":
|
||||||
version "1.8.1"
|
version "1.8.1"
|
||||||
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217"
|
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217"
|
||||||
@@ -673,7 +574,7 @@
|
|||||||
jest-diff "^25.2.1"
|
jest-diff "^25.2.1"
|
||||||
pretty-format "^25.2.1"
|
pretty-format "^25.2.1"
|
||||||
|
|
||||||
"@types/node@*", "@types/node@>= 8", "@types/node@^14.0.14":
|
"@types/node@*", "@types/node@^14.0.14":
|
||||||
version "14.11.5"
|
version "14.11.5"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.5.tgz#fecad41c041cae7f2404ad4b2d0742fdb628b305"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.5.tgz#fecad41c041cae7f2404ad4b2d0742fdb628b305"
|
||||||
integrity sha512-jVFzDV6NTbrLMxm4xDSIW/gKnk8rQLF9wAzLWIOg+5nU6ACrIMndeBdXci0FGtqJbP9tQvm6V39eshc96TO2wQ==
|
integrity sha512-jVFzDV6NTbrLMxm4xDSIW/gKnk8rQLF9wAzLWIOg+5nU6ACrIMndeBdXci0FGtqJbP9tQvm6V39eshc96TO2wQ==
|
||||||
@@ -939,11 +840,6 @@ bcrypt-pbkdf@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
tweetnacl "^0.14.3"
|
tweetnacl "^0.14.3"
|
||||||
|
|
||||||
before-after-hook@^2.1.0:
|
|
||||||
version "2.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635"
|
|
||||||
integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==
|
|
||||||
|
|
||||||
brace-expansion@^1.1.7:
|
brace-expansion@^1.1.7:
|
||||||
version "1.1.11"
|
version "1.1.11"
|
||||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||||
@@ -1218,10 +1114,10 @@ cssstyle@^2.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
cssom "~0.3.6"
|
cssom "~0.3.6"
|
||||||
|
|
||||||
csv-parse@^4.14.2:
|
csv-parse@^4.15.4:
|
||||||
version "4.14.2"
|
version "4.15.4"
|
||||||
resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-4.14.2.tgz#c1329cff95a99b8773a92c4e62f8bff114b34726"
|
resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-4.15.4.tgz#ad1ec62aaf71a642982dfcb81f1848184d691db5"
|
||||||
integrity sha512-YE2xlTKtM035/94llhgsp9qFQxGi47EkQJ1pZ+mLT/98GpIsbjkMGAb7Rmu9hNxVfYFOLf10hP+rPVqnoccLgw==
|
integrity sha512-OdBbFc0yZhOm17lSxqkirrHlFFVpKRT0wp4DAGoJelsP3LbGzV9LNr7XmM/lrr0uGkCtaqac9UhP8PDHXOAbMg==
|
||||||
|
|
||||||
dashdash@^1.12.0:
|
dashdash@^1.12.0:
|
||||||
version "1.14.1"
|
version "1.14.1"
|
||||||
@@ -1310,11 +1206,6 @@ delayed-stream@~1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
|
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
|
||||||
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
|
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
|
||||||
|
|
||||||
deprecation@^2.0.0, deprecation@^2.3.1:
|
|
||||||
version "2.3.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919"
|
|
||||||
integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==
|
|
||||||
|
|
||||||
detect-newline@^3.0.0:
|
detect-newline@^3.0.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
|
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
|
||||||
@@ -1911,11 +1802,6 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4:
|
|||||||
dependencies:
|
dependencies:
|
||||||
isobject "^3.0.1"
|
isobject "^3.0.1"
|
||||||
|
|
||||||
is-plain-object@^5.0.0:
|
|
||||||
version "5.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344"
|
|
||||||
integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==
|
|
||||||
|
|
||||||
is-potential-custom-element-name@^1.0.0:
|
is-potential-custom-element-name@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397"
|
resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397"
|
||||||
@@ -2747,11 +2633,6 @@ nice-try@^1.0.4:
|
|||||||
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
|
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
|
||||||
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
|
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
|
||||||
|
|
||||||
node-fetch@^2.6.1:
|
|
||||||
version "2.6.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
|
|
||||||
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
|
|
||||||
|
|
||||||
node-int64@^0.4.0:
|
node-int64@^0.4.0:
|
||||||
version "0.4.0"
|
version "0.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
|
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
|
||||||
@@ -3227,10 +3108,10 @@ saxes@^5.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
||||||
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
|
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
|
||||||
|
|
||||||
semver@7.x, semver@^7.3.2, semver@^7.3.4:
|
semver@7.x, semver@^7.3.2, semver@^7.3.5:
|
||||||
version "7.3.4"
|
version "7.3.5"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
|
||||||
integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==
|
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
lru-cache "^6.0.0"
|
lru-cache "^6.0.0"
|
||||||
|
|
||||||
@@ -3533,13 +3414,6 @@ throat@^5.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b"
|
resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b"
|
||||||
integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==
|
integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==
|
||||||
|
|
||||||
tmp@^0.2.1:
|
|
||||||
version "0.2.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14"
|
|
||||||
integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==
|
|
||||||
dependencies:
|
|
||||||
rimraf "^3.0.0"
|
|
||||||
|
|
||||||
tmpl@1.0.x:
|
tmpl@1.0.x:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
|
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
|
||||||
@@ -3630,11 +3504,6 @@ tunnel-agent@^0.6.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
safe-buffer "^5.0.1"
|
safe-buffer "^5.0.1"
|
||||||
|
|
||||||
tunnel@0.0.6:
|
|
||||||
version "0.0.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c"
|
|
||||||
integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==
|
|
||||||
|
|
||||||
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
|
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
|
||||||
version "0.14.5"
|
version "0.14.5"
|
||||||
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
|
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
|
||||||
@@ -3697,11 +3566,6 @@ union-value@^1.0.0:
|
|||||||
is-extendable "^0.1.1"
|
is-extendable "^0.1.1"
|
||||||
set-value "^2.0.1"
|
set-value "^2.0.1"
|
||||||
|
|
||||||
universal-user-agent@^6.0.0:
|
|
||||||
version "6.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee"
|
|
||||||
integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==
|
|
||||||
|
|
||||||
unset-value@^1.0.0:
|
unset-value@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
|
resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
|
||||||
|
|||||||
Reference in New Issue
Block a user