Compare commits

...

46 Commits

Author SHA1 Message Date
CrazyMax
57396166ad Merge pull request #237 from docker/dependabot/npm_and_yarn/csv-parse-5.3.1
Bump csv-parse from 5.3.0 to 5.3.1
2022-10-17 21:51:54 +02:00
CrazyMax
473bdc561c update generated content
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-17 21:50:02 +02:00
dependabot[bot]
ebedea2c18 Bump csv-parse from 5.3.0 to 5.3.1
Bumps [csv-parse](https://github.com/adaltas/node-csv/tree/HEAD/packages/csv-parse) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/adaltas/node-csv/releases)
- [Changelog](https://github.com/adaltas/node-csv/blob/master/packages/csv-parse/CHANGELOG.md)
- [Commits](https://github.com/adaltas/node-csv/commits/csv-parse@5.3.1/packages/csv-parse)

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>

---
updated-dependencies:
- dependency-name: csv-parse
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-17 21:49:36 +02:00
Tõnis Tiigi
d00b20e38f Merge pull request #239 from crazy-max/github-sha
revert changes to set associated head sha on pull request event
2022-10-17 09:09:59 -07:00
CrazyMax
a99e71cdc7 revert changes to set associated head sha on pull request event
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-17 11:49:09 +02:00
CrazyMax
12cce9efe0 Merge pull request #236 from crazy-max/setOutput
Remove workaround for setOutput
2022-10-12 08:34:51 +02:00
CrazyMax
f17e188860 Remove workaround for setOutput
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-12 07:07:13 +02:00
CrazyMax
210d783f42 Merge pull request #235 from crazy-max/update-docs
docs: update
2022-10-08 02:32:20 +02:00
CrazyMax
5f26473e44 docs: update links and layout
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-08 02:13:25 +02:00
CrazyMax
49e79e3532 docs: priority attribute
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-08 01:10:48 +02:00
CrazyMax
5ebec4fd21 docs: workflow_dispatch example
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-08 00:48:17 +02:00
CrazyMax
8ed470c7f1 Merge pull request #234 from crazy-max/fix-sha-pr
set associated head sha on pull request event
2022-10-08 00:35:58 +02:00
CrazyMax
61ddee1921 set associated head sha on pull request event
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-08 00:18:51 +02:00
CrazyMax
8671a4f8ec Merge pull request #233 from crazy-max/test-septags
do not trim whitespace for sep-tags and sep-labels inputs
2022-10-07 23:14:46 +02:00
CrazyMax
3862a1b70f do not trim whitespace for sep-tags and sep-labels inputs
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-07 23:10:32 +02:00
CrazyMax
f7c31b1e79 Merge pull request #221 from docker/dependabot/npm_and_yarn/csv-parse-5.3.0
Bump csv-parse from 5.1.0 to 5.3.0
2022-10-07 21:31:34 +02:00
CrazyMax
55b0d953e7 Update generated content
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-07 21:11:07 +02:00
dependabot[bot]
4c6a2cafd0 Bump csv-parse from 5.1.0 to 5.3.0
Bumps [csv-parse](https://github.com/adaltas/node-csv/tree/HEAD/packages/csv-parse) from 5.1.0 to 5.3.0.
- [Release notes](https://github.com/adaltas/node-csv/releases)
- [Changelog](https://github.com/adaltas/node-csv/blob/master/packages/csv-parse/CHANGELOG.md)
- [Commits](https://github.com/adaltas/node-csv/commits/csv-parse@5.3.0/packages/csv-parse)

---
updated-dependencies:
- dependency-name: csv-parse
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-07 19:09:44 +00:00
CrazyMax
6c51f019f8 Merge pull request #220 from docker/dependabot/npm_and_yarn/moment-2.29.4
Bump moment from 2.29.3 to 2.29.4
2022-10-07 21:08:43 +02:00
CrazyMax
5c9aa83b20 Update generated content
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-07 21:01:38 +02:00
dependabot[bot]
30af4d7327 Bump moment from 2.29.3 to 2.29.4
Bumps [moment](https://github.com/moment/moment) from 2.29.3 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.3...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-07 18:58:07 +00:00
CrazyMax
594a555a35 Merge pull request #232 from docker/dependabot/npm_and_yarn/actions/github-5.1.1
Bump @actions/github from 5.0.3 to 5.1.1
2022-10-07 20:56:21 +02:00
CrazyMax
7fa87ab51a Update generated content
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-07 20:54:56 +02:00
dependabot[bot]
02d1a10cce Bump @actions/github from 5.0.3 to 5.1.1
Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 5.0.3 to 5.1.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-07 18:51:43 +00:00
CrazyMax
58061722cc Merge pull request #231 from docker/dependabot/npm_and_yarn/actions/core-1.10.0
Bump @actions/core from 1.9.1 to 1.10.0
2022-10-07 20:49:23 +02:00
CrazyMax
1c9aacf050 Update generated content
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-07 20:44:07 +02:00
dependabot[bot]
1f87faac28 Bump @actions/core from 1.9.1 to 1.10.0
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.9.1 to 1.10.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-29 19:15:00 +00:00
CrazyMax
59bc9ddfd5 Merge pull request #226 from docker/dependabot/npm_and_yarn/actions/core-1.9.1
Bump @actions/core from 1.9.0 to 1.9.1
2022-08-24 13:16:11 +02:00
CrazyMax
286660a061 Update generated content
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-08-24 12:33:33 +02:00
dependabot[bot]
139c7584e2 Bump @actions/core from 1.9.0 to 1.9.1
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 19:20:50 +00:00
CrazyMax
ee266832e5 Merge pull request #216 from docker/dependabot/npm_and_yarn/actions/core-1.9.0
Bump @actions/core from 1.8.2 to 1.9.0
2022-08-03 12:12:48 +02:00
CrazyMax
ae052be62f Update generated content
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-08-03 12:10:35 +02:00
dependabot[bot]
98045504c7 Bump @actions/core from 1.8.2 to 1.9.0
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-15 19:11:29 +00:00
CrazyMax
97c170d70b Merge pull request #210 from docker/dependabot/npm_and_yarn/csv-parse-5.1.0
Bump csv-parse from 5.0.4 to 5.1.0
2022-06-07 11:58:36 +02:00
CrazyMax
44ecceaf69 Update generated content
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-06-07 11:52:29 +02:00
dependabot[bot]
e4d14b2070 Bump csv-parse from 5.0.4 to 5.1.0
Bumps [csv-parse](https://github.com/adaltas/node-csv/tree/HEAD/packages/csv-parse) from 5.0.4 to 5.1.0.
- [Release notes](https://github.com/adaltas/node-csv/releases)
- [Changelog](https://github.com/adaltas/node-csv/blob/master/packages/csv-parse/CHANGELOG.md)
- [Commits](https://github.com/adaltas/node-csv/commits/csv-parse@5.1.0/packages/csv-parse)

---
updated-dependencies:
- dependency-name: csv-parse
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-07 09:50:34 +00:00
CrazyMax
f66710ef6c Merge pull request #209 from docker/dependabot/npm_and_yarn/actions/core-1.8.2
Bump @actions/core from 1.6.0 to 1.8.2
2022-06-07 11:49:03 +02:00
CrazyMax
d6cc766711 Update generated content
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-06-07 11:47:39 +02:00
dependabot[bot]
9c37b1c855 Bump @actions/core from 1.6.0 to 1.8.2
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.6.0 to 1.8.2.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-07 09:43:33 +00:00
CrazyMax
e518b0e7bb Merge pull request #208 from docker/dependabot/npm_and_yarn/actions/github-5.0.3
Bump @actions/github from 5.0.1 to 5.0.3
2022-06-07 11:41:16 +02:00
CrazyMax
7bf589e898 Update generated content
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-06-07 11:37:11 +02:00
CrazyMax
bc6cb60a8a Merge pull request #213 from crazy-max/bump-actions
Bump actions to latest major
2022-06-07 11:22:34 +02:00
CrazyMax
4db6eea5ea Bump actions to latest major
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-26 23:43:36 +02:00
dependabot[bot]
b5ee2f25f6 Bump @actions/github from 5.0.1 to 5.0.3
Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 5.0.1 to 5.0.3.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

---
updated-dependencies:
- dependency-name: "@actions/github"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-13 19:12:51 +00:00
CrazyMax
8d56fe93cf Merge pull request #204 from crazy-max/update-refs
Bump all Docker actions to latest major
2022-05-05 19:46:24 +02:00
CrazyMax
59267481d9 Bump all Docker actions to latest major
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-05 19:42:03 +02:00
15 changed files with 673 additions and 203 deletions

View File

@@ -254,15 +254,15 @@ jobs:
type=sha type=sha
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v2
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v2
with: with:
driver-opts: network=host driver-opts: network=host
- -
name: Build and push to local registry name: Build and push to local registry
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
with: with:
context: ./test context: ./test
file: ./test/Dockerfile file: ./test/Dockerfile
@@ -309,16 +309,44 @@ jobs:
type=sha type=sha
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v2
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v2
- -
name: Build name: Build
uses: docker/bake-action@v1 uses: docker/bake-action@v2
with: with:
files: | files: |
./test/docker-bake.hcl ./test/docker-bake.hcl
${{ steps.docker_meta.outputs.bake-file }} ${{ steps.docker_meta.outputs.bake-file }}
targets: | targets: |
release release
sep-tags:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sep:
- " "
- ","
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta
id: meta
uses: ./
with:
images: |
${{ env.DOCKER_IMAGE }}
ghcr.io/name/app
sep-tags: ${{ matrix.sep }}
-
name: Tags
uses: actions/github-script@v6
with:
script: |
console.log(`${{ steps.meta.outputs.tags }}`);

View File

@@ -19,12 +19,12 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- -
name: Validate name: Validate
uses: docker/bake-action@v1 uses: docker/bake-action@v2
with: with:
targets: validate targets: validate
- -
name: Test name: Test
uses: docker/bake-action@v1 uses: docker/bake-action@v2
with: with:
targets: test targets: test
- -

217
README.md
View File

@@ -5,8 +5,9 @@
## About ## About
GitHub Action to extract metadata from Git reference and GitHub events. GitHub Action to extract metadata from Git reference and GitHub events. This action
This action is particularly useful if used with [Docker Build Push](https://github.com/docker/build-push-action) action to tag and label Docker images. is particularly useful if used with [Docker Build Push](https://github.com/docker/build-push-action)
action to tag and label Docker images.
![Screenshot](.github/metadata-action.png) ![Screenshot](.github/metadata-action.png)
@@ -19,6 +20,7 @@ ___
* [Customizing](#customizing) * [Customizing](#customizing)
* [inputs](#inputs) * [inputs](#inputs)
* [outputs](#outputs) * [outputs](#outputs)
* [environment variables](#environment-variables)
* [`images` input](#images-input) * [`images` input](#images-input)
* [`flavor` input](#flavor-input) * [`flavor` input](#flavor-input)
* [`tags` input](#tags-input) * [`tags` input](#tags-input)
@@ -33,6 +35,7 @@ ___
* [Notes](#notes) * [Notes](#notes)
* [Image name and tag sanitization](#image-name-and-tag-sanitization) * [Image name and tag sanitization](#image-name-and-tag-sanitization)
* [Latest tag](#latest-tag) * [Latest tag](#latest-tag)
* [`priority` attribute](#priority-attribute)
* [Global expressions](#global-expressions) * [Global expressions](#global-expressions)
* [`{{branch}}`](#branch) * [`{{branch}}`](#branch)
* [`{{tag}}`](#tag) * [`{{tag}}`](#tag)
@@ -43,7 +46,7 @@ ___
* [Major version zero](#major-version-zero) * [Major version zero](#major-version-zero)
* [JSON output object](#json-output-object) * [JSON output object](#json-output-object)
* [Overwrite labels](#overwrite-labels) * [Overwrite labels](#overwrite-labels)
* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot) * [Contributing](#contributing)
## Usage ## Usage
@@ -53,6 +56,7 @@ ___
name: ci name: ci
on: on:
workflow_dispatch:
push: push:
branches: branches:
- 'master' - 'master'
@@ -68,7 +72,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- -
name: Docker meta name: Docker meta
id: meta id: meta
@@ -78,13 +82,13 @@ jobs:
- -
name: Login to DockerHub name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v1 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
with: with:
context: . context: .
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
@@ -92,13 +96,14 @@ jobs:
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
``` ```
| Event | Ref | Docker Tags | | Event | Ref | Docker Tags |
|-----------------|-------------------------------|-------------------------------------| |---------------------|-------------------------------|----------------------------|
| `pull_request` | `refs/pull/2/merge` | `pr-2` | | `pull_request` | `refs/pull/2/merge` | `pr-2` |
| `push` | `refs/heads/master` | `master` | | `push` | `refs/heads/master` | `master` |
| `push` | `refs/heads/releases/v1` | `releases-v1` | | `push` | `refs/heads/releases/v1` | `releases-v1` |
| `push tag` | `refs/tags/v1.2.3` | `v1.2.3`, `latest` | | `push tag` | `refs/tags/v1.2.3` | `v1.2.3`, `latest` |
| `push tag` | `refs/tags/v2.0.8-beta.67` | `v2.0.8-beta.67`, `latest` | | `push tag` | `refs/tags/v2.0.8-beta.67` | `v2.0.8-beta.67`, `latest` |
| `workflow_dispatch` | `refs/heads/master` | `master` |
### Semver ### Semver
@@ -121,7 +126,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- -
name: Docker meta name: Docker meta
id: meta id: meta
@@ -137,13 +142,13 @@ jobs:
- -
name: Login to DockerHub name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v1 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
with: with:
context: . context: .
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
@@ -162,8 +167,8 @@ jobs:
### Bake definition ### Bake definition
This action also handles a bake definition file that can be used with the This action also handles a bake definition file that can be used with the
[Docker Bake action](https://github.com/docker/bake-action). You just have to declare an empty target named [Docker Bake action](https://github.com/docker/bake-action). You just have to
`docker-metadata-action` and inherit from it. declare an empty target named `docker-metadata-action` and inherit from it.
```hcl ```hcl
// docker-bake.hcl // docker-bake.hcl
@@ -199,7 +204,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- -
name: Docker meta name: Docker meta
id: meta id: meta
@@ -215,7 +220,7 @@ jobs:
type=sha type=sha
- -
name: Build name: Build
uses: docker/bake-action@v1 uses: docker/bake-action@v2
with: with:
files: | files: |
./docker-bake.hcl ./docker-bake.hcl
@@ -223,7 +228,8 @@ jobs:
targets: build targets: build
``` ```
Content of `${{ steps.meta.outputs.bake-file }}` file will look like this with `refs/tags/v1.2.3` ref: Content of `${{ steps.meta.outputs.bake-file }}` file will look like this with
`refs/tags/v1.2.3` ref:
```json ```json
{ {
@@ -282,13 +288,19 @@ Following inputs can be used as `step.with` keys
Following outputs are available Following outputs are available
| Name | Type | Description | | Name | Type | Description |
|---------------|---------|-------------------------------------------------------------------------------| |---------------|---------|--------------------------------------------------------------------------------------------|
| `version` | String | Docker image version | | `version` | String | Docker image version |
| `tags` | String | Docker tags | | `tags` | String | Docker tags |
| `labels` | String | Docker labels | | `labels` | String | Docker labels |
| `json` | String | JSON output of tags and labels | | `json` | String | JSON output of tags and labels |
| `bake-file` | File | [Bake definition file](https://github.com/docker/buildx#file-definition) path | | `bake-file` | File | [Bake file definition](https://docs.docker.com/build/customize/bake/file-definition/) path |
### environment variables
| Name | Type | Description |
|-------------------------------|------|------------------------------------------------------------------------------------------------------------|
| `DOCKER_METADATA_PR_HEAD_SHA` | Bool | If `true`, set associated head SHA instead of commit SHA that triggered the workflow on pull request event |
## `images` input ## `images` input
@@ -325,13 +337,16 @@ flavor: |
``` ```
* `latest=<auto|true|false>`: Handle [latest tag](#latest-tag) (default `auto`) * `latest=<auto|true|false>`: Handle [latest tag](#latest-tag) (default `auto`)
* `prefix=<string>,onlatest=<true|false>`: A global prefix for each generated tag and optionally for `latest` * `prefix=<string>,onlatest=<true|false>`: A global prefix for each generated
* `suffix=<string>,onlatest=<true|false>`: A global suffix for each generated tag and optionally for `latest` tag and optionally for `latest`
* `suffix=<string>,onlatest=<true|false>`: A global suffix for each generated
tag and optionally for `latest`
## `tags` input ## `tags` input
`tags` is the core input of this action as everything related to it will reflect the output metadata. This one is in `tags` is the core input of this action as everything related to it will
the form of a key-value pair list in CSV format to remove limitations intrinsically linked to GitHub Actions reflect the output metadata. This one is in the form of a key-value pair list
in CSV format to remove limitations intrinsically linked to GitHub Actions
(only string format is handled in the input fields). Here is an example: (only string format is handled in the input fields). Here is an example:
```yaml ```yaml
@@ -359,7 +374,7 @@ Each entry is defined by a `type`, which are:
And global attributes: And global attributes:
* `enable=<true|false>` enable this entry (default `true`) * `enable=<true|false>` enable this entry (default `true`)
* `priority=<number>` priority to manage the order of tags * `priority=<number>` set tag [priority](#priority-attribute) order
* `prefix=<string>` add prefix * `prefix=<string>` add prefix
* `suffix=<string>` add suffix * `suffix=<string>` add suffix
@@ -385,10 +400,11 @@ tags: |
type=schedule,pattern={{date 'YYYYMMDD'}} type=schedule,pattern={{date 'YYYYMMDD'}}
``` ```
Will be used on [schedule event](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#schedule). Will be used on [schedule event](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule).
`pattern` is a specially crafted attribute to support [Handlebars' template](https://handlebarsjs.com/guide/)
with the following expressions:
`pattern` is a specially crafted attribute to support [Handlebars' template](https://handlebarsjs.com/guide/) with
the following expressions:
* `date 'format'` ; render date by its [moment format](https://momentjs.com/docs/#/displaying/format/) * `date 'format'` ; render date by its [moment format](https://momentjs.com/docs/#/displaying/format/)
| Pattern | Output | | Pattern | Output |
@@ -413,11 +429,13 @@ tags: |
type=semver,pattern={{version}},value=v1.0.0 type=semver,pattern={{version}},value=v1.0.0
``` ```
Will be used on a [push tag event](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#push) Will be used on a [push tag event](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push)
and requires a valid [semver](https://semver.org/) Git tag, but you can also use a custom value through `value` and requires a valid [semver](https://semver.org/) Git tag, but you can also
attribute. use a custom value through `value` attribute.
`pattern` attribute supports [Handlebars template](https://handlebarsjs.com/guide/)
with the following expressions:
`pattern` attribute supports [Handlebars template](https://handlebarsjs.com/guide/) with the following expressions:
* `raw` ; the actual tag * `raw` ; the actual tag
* `version` ; shorthand for `{{major}}.{{minor}}.{{patch}}` (can include pre-release) * `version` ; shorthand for `{{major}}.{{minor}}.{{patch}}` (can include pre-release)
* `major` ; major version identifier * `major` ; major version identifier
@@ -436,9 +454,10 @@ attribute.
| `v2.0.8-beta.67` | `{{version}}` | `2.0.8-beta.67` | | `v2.0.8-beta.67` | `{{version}}` | `2.0.8-beta.67` |
| `v2.0.8-beta.67` | `{{major}}.{{minor}}` | `2.0.8-beta.67`* | | `v2.0.8-beta.67` | `{{major}}.{{minor}}` | `2.0.8-beta.67`* |
> *Pre-release (rc, beta, alpha) will only extend `{{version}}` (or `{{raw}}` if specified) as tag > *Pre-release (rc, beta, alpha) will only extend `{{version}}` (or `{{raw}}`
> because they are updated frequently, and contain many breaking changes that are (by the author's design) > if specified) as tag because they are updated frequently, and contain many
> not yet fit for public consumption. > breaking changes that are (by the author's design) not yet fit for public
> consumption.
Extended attributes and default values: Extended attributes and default values:
@@ -457,11 +476,13 @@ tags: |
type=pep440,pattern={{version}},value=1.0.0 type=pep440,pattern={{version}},value=1.0.0
``` ```
Will be used on a [push tag event](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#push) Will be used on a [push tag event](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push)
and requires a Git tag that conforms to [PEP 440](https://www.python.org/dev/peps/pep-0440/), but you can also use a and requires a Git tag that conforms to [PEP 440](https://www.python.org/dev/peps/pep-0440/),
custom value through `value` attribute. but you can also use a custom value through `value` attribute.
`pattern` attribute supports [Handlebars template](https://handlebarsjs.com/guide/)
with the following expressions:
`pattern` attribute supports [Handlebars template](https://handlebarsjs.com/guide/) with the following expressions:
* `raw` ; the actual tag * `raw` ; the actual tag
* `version` ; cleaned version * `version` ; cleaned version
* `major` ; major version identifier * `major` ; major version identifier
@@ -482,9 +503,10 @@ custom value through `value` attribute.
| `1.2.3beta2` | `{{major}}.{{minor}}` | `1.2.3b2`* | | `1.2.3beta2` | `{{major}}.{{minor}}` | `1.2.3b2`* |
| `1.0dev4` | `{{major}}.{{minor}}` | `1.0.dev4`* | | `1.0dev4` | `{{major}}.{{minor}}` | `1.0.dev4`* |
> *dev/pre/post release will only extend `{{version}}` (or `{{raw}}` if specified) as tag > *dev/pre/post release will only extend `{{version}}` (or `{{raw}}` if
> because they are updated frequently, and contain many breaking changes that are (by the author's design) > specified) as tag because they are updated frequently, and contain many
> not yet fit for public consumption. > breaking changes that are (by the author's design) not yet fit for public
> consumption.
Extended attributes and default values: Extended attributes and default values:
@@ -505,9 +527,9 @@ tags: |
type=match,pattern=v(.*),group=1,value=v1.0.0 type=match,pattern=v(.*),group=1,value=v1.0.0
``` ```
Can create a regular expression for matching Git tag with a pattern and capturing group. Will be used on a Can create a regular expression for matching Git tag with a pattern and
[push tag event](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#push) but, you can also use capturing group. Will be used on a [push tag event](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push)
a custom value through `value` attribute. but, you can also use a custom value through `value` attribute.
| Git tag | Pattern | Group | Output | | Git tag | Pattern | Group | Output |
|-------------------------|------------------|---------|------------------------| |-------------------------|------------------|---------|------------------------|
@@ -534,9 +556,9 @@ tags: |
type=edge,branch=main type=edge,branch=main
``` ```
An `edge` tag reflects the last commit of the active branch on your Git repository. I usually prefer to use `edge` An `edge` tag reflects the last commit of the active branch on your Git
as a Docker tag for a better distinction or common pattern. This is also used by official images repository. I usually prefer to use `edge` as a Docker tag for a better
like [Alpine](https://hub.docker.com/_/alpine). distinction or common pattern. This is also used by official images like [Alpine](https://hub.docker.com/_/alpine).
Extended attributes and default values: Extended attributes and default values:
@@ -558,17 +580,19 @@ tags: |
``` ```
This type handles Git ref (or reference) for the following events: This type handles Git ref (or reference) for the following events:
* `branch` ; eg. `refs/heads/master` * `branch` ; eg. `refs/heads/master`
* `tag` ; eg. `refs/tags/v1.0.0` * `tag` ; eg. `refs/tags/v1.0.0`
* `pr` ; eg. `refs/pull/318/merge` * `pr` ; eg. `refs/pull/318/merge`
| Event | Ref | Output | | Event | Ref | Output |
|-----------------|-------------------------------|-------------------------------| |---------------------|-------------------------------|------------------|
| `pull_request` | `refs/pull/2/merge` | `pr-2` | | `pull_request` | `refs/pull/2/merge` | `pr-2` |
| `push` | `refs/heads/master` | `master` | | `push` | `refs/heads/master` | `master` |
| `push` | `refs/heads/my/branch` | `my-branch` | | `push` | `refs/heads/my/branch` | `my-branch` |
| `push tag` | `refs/tags/v1.2.3` | `v1.2.3` | | `push tag` | `refs/tags/v1.2.3` | `v1.2.3` |
| `push tag` | `refs/tags/v2.0.8-beta.67` | `v2.0.8-beta.67` | | `push tag` | `refs/tags/v2.0.8-beta.67` | `v2.0.8-beta.67` |
| `workflow_dispatch` | `refs/heads/master` | `master` |
Extended attributes and default values: Extended attributes and default values:
@@ -628,7 +652,7 @@ tags: |
### Image name and tag sanitization ### Image name and tag sanitization
In order to comply with [the specification](https://docs.docker.com/engine/reference/commandline/tag/#extended-description), In order to comply with [the specification](https://docs.docker.com/engine/reference/commandline/tag/#description),
the image name components may contain lowercase letters, digits and separators. the image name components may contain lowercase letters, digits and separators.
A separator is defined as a period, one or two underscores, or one or more A separator is defined as a period, one or two underscores, or one or more
dashes. A name component may not start or end with a separator. dashes. A name component may not start or end with a separator.
@@ -644,7 +668,9 @@ To ease the integration in your workflow, this action will automatically:
### Latest tag ### Latest tag
`latest` tag is handled through the [`flavor` input](#flavor-input). It will be generated by default (`auto` mode) for: `latest` tag is handled through the [`flavor` input](#flavor-input). It will be
generated by default (`auto` mode) for:
* [`type=ref,event=tag`](#typeref) * [`type=ref,event=tag`](#typeref)
* [`type=semver,pattern=...`](#typesemver) * [`type=semver,pattern=...`](#typesemver)
* [`type=match,pattern=...`](#typematch) * [`type=match,pattern=...`](#typematch)
@@ -667,6 +693,24 @@ tags: |
type=raw,value=latest,enable={{is_default_branch}} type=raw,value=latest,enable={{is_default_branch}}
``` ```
### `priority` attribute
`priority=<int>` attribute is used to sort tags in the final list. The higher
the value, the higher the priority. The first tag in the list (higher priority)
will be used as the image version for generated OCI label and [`version` output](#outputs).
Each tags `type` attribute has a default priority:
| Attribute | Default priority |
|------------|------------------|
| `schedule` | `1000` |
| `semver` | `900` |
| `pep440` | `900` |
| `match` | `800` |
| `edge` | `700` |
| `ref` | `600` |
| `raw` | `200` |
| `sha` | `100` |
### Global expressions ### Global expressions
The following [Handlebars' template](https://handlebarsjs.com/guide/) expressions The following [Handlebars' template](https://handlebarsjs.com/guide/) expressions
@@ -685,12 +729,12 @@ tags: |
Returns the branch name that triggered the workflow run. Will be empty if not Returns the branch name that triggered the workflow run. Will be empty if not
a branch reference: a branch reference:
| Event | Ref | Output | | Event | Ref | Output |
|-----------------|-------------------------------|---------------------| |----------------|------------------------|-------------|
| `pull_request` | `refs/pull/2/merge` | | | `pull_request` | `refs/pull/2/merge` | |
| `push` | `refs/heads/master` | `master` | | `push` | `refs/heads/master` | `master` |
| `push` | `refs/heads/my/branch` | `my-branch` | | `push` | `refs/heads/my/branch` | `my-branch` |
| `push tag` | `refs/tags/v1.2.3` | | | `push tag` | `refs/tags/v1.2.3` | |
#### `{{tag}}` #### `{{tag}}`
@@ -742,11 +786,11 @@ Returns the current date rendered by its [moment format](https://momentjs.com/do
### Major version zero ### Major version zero
Major version zero (`0.y.z`) is for initial development and **may** change at any time. This means the public API Major version zero (`0.y.z`) is for initial development and **may** change at
[**should not** be considered stable](https://semver.org/#spec-item-4). any time. This means the public API [**should not** be considered stable](https://semver.org/#spec-item-4).
In this case, Docker tag `0` **should not** be generated if you're using [`type=semver`](#typesemver) with `{{major}}` In this case, Docker tag `0` **should not** be generated if you're using [`type=semver`](#typesemver)
pattern. You can manage this behavior like this: with `{{major}}` pattern. You can manage this behavior like this:
```yaml ```yaml
# refs/tags/v0.1.2 # refs/tags/v0.1.2
@@ -761,8 +805,8 @@ tags: |
### JSON output object ### JSON output object
The `json` output is a JSON object composed of the generated tags and labels so that you can reuse them further in your The `json` output is a JSON object composed of the generated tags and labels so
workflow using the [`fromJSON` function](https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson): that you can reuse them further in your workflow using the [`fromJSON` function](https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson):
```yaml ```yaml
- -
@@ -773,7 +817,7 @@ workflow using the [`fromJSON` function](https://docs.github.com/en/actions/lear
images: name/app images: name/app
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
with: with:
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
@@ -802,18 +846,7 @@ labels generated are not suitable, you can overwrite them like this:
org.opencontainers.image.vendor=MyCompany org.opencontainers.image.vendor=MyCompany
``` ```
## Keep up-to-date with GitHub Dependabot ## Contributing
Since [Dependabot](https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot) Want to contribute? Awesome! You can find information about contributing to
has [native GitHub Actions support](https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#package-ecosystem), this project in the [CONTRIBUTING.md](/.github/CONTRIBUTING.md)
to enable it on your GitHub repo all you need to do is add the `.github/dependabot.yml` file:
```yaml
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
```

View File

@@ -2,7 +2,8 @@
## v2 to v3 ## v2 to v3
* Repository has been moved to docker org. Replace `crazy-max/ghaction-docker-meta@v2` with `docker/metadata-action@v4` * Repository has been moved to docker org. Replace `crazy-max/ghaction-docker-meta@v2`
with `docker/metadata-action@v4`
* The default bake target has been changed: `ghaction-docker-meta` > `docker-metadata-action` * The default bake target has been changed: `ghaction-docker-meta` > `docker-metadata-action`
## v1 to v2 ## v1 to v2
@@ -132,7 +133,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- -
name: Docker meta name: Docker meta
id: meta id: meta
@@ -142,13 +143,13 @@ jobs:
- -
name: Login to DockerHub name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v1 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
with: with:
context: . context: .
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
@@ -176,7 +177,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- -
name: Docker meta name: Docker meta
id: meta id: meta
@@ -186,13 +187,13 @@ jobs:
- -
name: Login to DockerHub name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v1 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
with: with:
context: . context: .
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
@@ -222,7 +223,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- -
name: Docker meta name: Docker meta
id: meta id: meta
@@ -235,13 +236,13 @@ jobs:
- -
name: Login to DockerHub name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v1 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
with: with:
context: . context: .
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
@@ -269,7 +270,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- -
name: Docker meta name: Docker meta
id: meta id: meta
@@ -284,13 +285,13 @@ jobs:
- -
name: Login to DockerHub name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v1 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
with: with:
context: . context: .
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}

View File

@@ -1,6 +1,5 @@
import {beforeEach, describe, expect, it, jest} from '@jest/globals'; import {describe, expect, it, jest} from '@jest/globals';
import * as fs from 'fs'; import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path'; import * as path from 'path';
import * as context from '../src/context'; import * as context from '../src/context';
@@ -166,30 +165,6 @@ describe('asyncForEach', () => {
}); });
}); });
describe('setOutput', () => {
beforeEach(() => {
process.stdout.write = jest.fn() as typeof process.stdout.write;
});
// eslint-disable-next-line jest/expect-expect
it('setOutput produces the correct command', () => {
context.setOutput('some output', 'some value');
assertWriteCalls([`::set-output name=some output::some value${os.EOL}`]);
});
// eslint-disable-next-line jest/expect-expect
it('setOutput handles bools', () => {
context.setOutput('some output', false);
assertWriteCalls([`::set-output name=some output::false${os.EOL}`]);
});
// eslint-disable-next-line jest/expect-expect
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/master/packages/core/src/core.ts#L67 // See: https://github.com/actions/toolkit/blob/master/packages/core/src/core.ts#L67
function getInputName(name: string): string { function getInputName(name: string): string {
return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`; return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
@@ -198,11 +173,3 @@ 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]);
}
}

View File

@@ -65,6 +65,7 @@ const tagsLabelsTest = async (name: string, envFile: string, inputs: Inputs, exV
describe('null', () => { describe('null', () => {
// prettier-ignore // prettier-ignore
// eslint-disable-next-line jest/expect-expect
test.each([ test.each([
[ [
'null01', 'null01',
@@ -121,6 +122,7 @@ describe('null', () => {
describe('push', () => { describe('push', () => {
// prettier-ignore // prettier-ignore
// eslint-disable-next-line jest/expect-expect
test.each([ test.each([
[ [
'push01', 'push01',
@@ -732,6 +734,7 @@ describe('push', () => {
describe('tag', () => { describe('tag', () => {
// prettier-ignore // prettier-ignore
// eslint-disable-next-line jest/expect-expect
test.each([ test.each([
[ [
'tag01', 'tag01',
@@ -1777,6 +1780,7 @@ describe('tag', () => {
describe('latest', () => { describe('latest', () => {
// prettier-ignore // prettier-ignore
// eslint-disable-next-line jest/expect-expect
test.each([ test.each([
[ [
'latest01', 'latest01',
@@ -2064,6 +2068,7 @@ describe('latest', () => {
describe('pr', () => { describe('pr', () => {
// prettier-ignore // prettier-ignore
// eslint-disable-next-line jest/expect-expect
test.each([ test.each([
[ [
'pr01', 'pr01',
@@ -2409,8 +2414,373 @@ describe('pr', () => {
])('given %p with %p event', tagsLabelsTest); ])('given %p with %p event', tagsLabelsTest);
}); });
describe('pr-head-sha', () => {
// prettier-ignore
// eslint-disable-next-line jest/expect-expect
test.each([
[
'pr01',
'event_pull_request.env',
{
images: ['user/app'],
} as Inputs,
{
main: 'pr-15',
partial: [],
latest: false
} as Version,
[
'user/app:pr-15'
],
[
"org.opencontainers.image.title=Hello-World",
"org.opencontainers.image.description=This your first repo!",
"org.opencontainers.image.url=https://github.com/octocat/Hello-World",
"org.opencontainers.image.source=https://github.com/octocat/Hello-World",
"org.opencontainers.image.version=pr-15",
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision=3370e228f2209994d57af4427fe64e71bb79ac96",
"org.opencontainers.image.licenses=MIT"
]
],
[
'pr02',
'event_pull_request.env',
{
images: ['org/app', 'ghcr.io/user/app'],
} as Inputs,
{
main: 'pr-15',
partial: [],
latest: false
} as Version,
[
'org/app:pr-15',
'ghcr.io/user/app:pr-15'
],
[
"org.opencontainers.image.title=Hello-World",
"org.opencontainers.image.description=This your first repo!",
"org.opencontainers.image.url=https://github.com/octocat/Hello-World",
"org.opencontainers.image.source=https://github.com/octocat/Hello-World",
"org.opencontainers.image.version=pr-15",
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision=3370e228f2209994d57af4427fe64e71bb79ac96",
"org.opencontainers.image.licenses=MIT"
]
],
[
'pr03',
'event_pull_request.env',
{
images: ['org/app', 'ghcr.io/user/app'],
tags: [
`type=ref,event=pr`,
`type=sha`
]
} as Inputs,
{
main: 'pr-15',
partial: ['sha-3370e22'],
latest: false
} as Version,
[
'org/app:pr-15',
'org/app:sha-3370e22',
'ghcr.io/user/app:pr-15',
'ghcr.io/user/app:sha-3370e22'
],
[
"org.opencontainers.image.title=Hello-World",
"org.opencontainers.image.description=This your first repo!",
"org.opencontainers.image.url=https://github.com/octocat/Hello-World",
"org.opencontainers.image.source=https://github.com/octocat/Hello-World",
"org.opencontainers.image.version=pr-15",
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision=3370e228f2209994d57af4427fe64e71bb79ac96",
"org.opencontainers.image.licenses=MIT"
]
],
[
'pr04',
'event_pull_request.env',
{
images: ['org/app', 'ghcr.io/user/app'],
tags: [
`type=sha,priority=2000`,
`type=ref,event=pr`
]
} as Inputs,
{
main: 'sha-3370e22',
partial: ['pr-15'],
latest: false
} as Version,
[
'org/app:sha-3370e22',
'org/app:pr-15',
'ghcr.io/user/app:sha-3370e22',
'ghcr.io/user/app:pr-15'
],
[
"org.opencontainers.image.title=Hello-World",
"org.opencontainers.image.description=This your first repo!",
"org.opencontainers.image.url=https://github.com/octocat/Hello-World",
"org.opencontainers.image.source=https://github.com/octocat/Hello-World",
"org.opencontainers.image.version=sha-3370e22",
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision=3370e228f2209994d57af4427fe64e71bb79ac96",
"org.opencontainers.image.licenses=MIT"
]
],
[
'pr05',
'event_pull_request.env',
{
images: ['org/app', 'ghcr.io/user/app'],
tags: [
`type=ref,event=pr`
],
flavor: [
`prefix=glo-`,
`suffix=-bal`
]
} as Inputs,
{
main: 'pr-15-bal',
partial: [],
latest: false
} as Version,
[
'org/app:pr-15-bal',
'ghcr.io/user/app:pr-15-bal'
],
[
"org.opencontainers.image.title=Hello-World",
"org.opencontainers.image.description=This your first repo!",
"org.opencontainers.image.url=https://github.com/octocat/Hello-World",
"org.opencontainers.image.source=https://github.com/octocat/Hello-World",
"org.opencontainers.image.version=pr-15-bal",
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision=3370e228f2209994d57af4427fe64e71bb79ac96",
"org.opencontainers.image.licenses=MIT"
]
],
[
'pr06',
'event_pull_request.env',
{
images: ['org/app', 'ghcr.io/user/app'],
tags: [
`type=ref,event=pr,prefix=`
],
flavor: [
`prefix=glo-`,
`suffix=-bal`
]
} as Inputs,
{
main: '15-bal',
partial: [],
latest: false
} as Version,
[
'org/app:15-bal',
'ghcr.io/user/app:15-bal'
],
[
"org.opencontainers.image.title=Hello-World",
"org.opencontainers.image.description=This your first repo!",
"org.opencontainers.image.url=https://github.com/octocat/Hello-World",
"org.opencontainers.image.source=https://github.com/octocat/Hello-World",
"org.opencontainers.image.version=15-bal",
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision=3370e228f2209994d57af4427fe64e71bb79ac96",
"org.opencontainers.image.licenses=MIT"
]
],
[
'pr07',
'event_pull_request_target.env',
{
images: ['org/app', 'ghcr.io/user/app'],
tags: [
`type=sha,priority=2000`,
`type=ref,event=pr`
]
} as Inputs,
{
main: 'sha-3370e22',
partial: ['pr-15'],
latest: false
} as Version,
[
'org/app:sha-3370e22',
'org/app:pr-15',
'ghcr.io/user/app:sha-3370e22',
'ghcr.io/user/app:pr-15'
],
[
"org.opencontainers.image.title=Hello-World",
"org.opencontainers.image.description=This your first repo!",
"org.opencontainers.image.url=https://github.com/octocat/Hello-World",
"org.opencontainers.image.source=https://github.com/octocat/Hello-World",
"org.opencontainers.image.version=sha-3370e22",
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision=3370e228f2209994d57af4427fe64e71bb79ac96",
"org.opencontainers.image.licenses=MIT"
]
],
[
'pr08',
'event_pull_request_target.env',
{
images: ['org/app', 'ghcr.io/user/app'],
tags: [
`type=ref,event=pr,prefix=`
],
flavor: [
`prefix=glo-`,
`suffix=-bal`
]
} as Inputs,
{
main: '15-bal',
partial: [],
latest: false
} as Version,
[
'org/app:15-bal',
'ghcr.io/user/app:15-bal'
],
[
"org.opencontainers.image.title=Hello-World",
"org.opencontainers.image.description=This your first repo!",
"org.opencontainers.image.url=https://github.com/octocat/Hello-World",
"org.opencontainers.image.source=https://github.com/octocat/Hello-World",
"org.opencontainers.image.version=15-bal",
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision=3370e228f2209994d57af4427fe64e71bb79ac96",
"org.opencontainers.image.licenses=MIT"
]
],
[
'pr09',
'event_pull_request_target.env',
{
images: ['org/app'],
tags: [
`type=ref,event=tag`,
`type=ref,event=pr`,
`type=ref,event=branch`,
`type=sha`,
`type=sha,format=long`
]
} as Inputs,
{
main: 'pr-15',
partial: [
'sha-3370e22',
'sha-3370e228f2209994d57af4427fe64e71bb79ac96'
],
latest: false
} as Version,
[
'org/app:pr-15',
'org/app:sha-3370e22',
'org/app:sha-3370e228f2209994d57af4427fe64e71bb79ac96'
],
[
"org.opencontainers.image.title=Hello-World",
"org.opencontainers.image.description=This your first repo!",
"org.opencontainers.image.url=https://github.com/octocat/Hello-World",
"org.opencontainers.image.source=https://github.com/octocat/Hello-World",
"org.opencontainers.image.version=pr-15",
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision=3370e228f2209994d57af4427fe64e71bb79ac96",
"org.opencontainers.image.licenses=MIT"
]
],
[
'pr10',
'event_pull_request_target.env',
{
images: ['org/app'],
tags: [
`type=raw,value=mytag-{{base_ref}}`,
`type=raw,mytag-defbranch,enable={{is_default_branch}}`
]
} as Inputs,
{
main: 'mytag-master',
partial: [],
latest: false
} as Version,
[
'org/app:mytag-master'
],
[
"org.opencontainers.image.title=Hello-World",
"org.opencontainers.image.description=This your first repo!",
"org.opencontainers.image.url=https://github.com/octocat/Hello-World",
"org.opencontainers.image.source=https://github.com/octocat/Hello-World",
"org.opencontainers.image.version=mytag-master",
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision=3370e228f2209994d57af4427fe64e71bb79ac96",
"org.opencontainers.image.licenses=MIT"
]
],
[
'pr11',
'event_pull_request.env',
{
images: ['org/app'],
tags: [
`type=raw,value=mytag-{{base_ref}}`,
`type=raw,mytag-defbranch,enable={{is_default_branch}}`
]
} as Inputs,
{
main: 'mytag-master',
partial: [],
latest: false
} as Version,
[
'org/app:mytag-master'
],
[
"org.opencontainers.image.title=Hello-World",
"org.opencontainers.image.description=This your first repo!",
"org.opencontainers.image.url=https://github.com/octocat/Hello-World",
"org.opencontainers.image.source=https://github.com/octocat/Hello-World",
"org.opencontainers.image.version=mytag-master",
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision=3370e228f2209994d57af4427fe64e71bb79ac96",
"org.opencontainers.image.licenses=MIT"
]
],
])('given %p with %p event', async (name: string, envFile: string, inputs: Inputs, exVersion: Version, exTags: Array<string>, exLabels: Array<string>) => {
process.env = dotenv.parse(fs.readFileSync(path.join(__dirname, 'fixtures', envFile)));
process.env.DOCKER_METADATA_PR_HEAD_SHA = 'true';
const context = github.context();
const repo = await github.repo(process.env.GITHUB_TOKEN || '');
const meta = new Meta({...getInputs(), ...inputs}, context, repo);
const version = meta.version;
expect(version).toEqual(exVersion);
const tags = meta.getTags();
expect(tags).toEqual(exTags);
const labels = meta.getLabels();
expect(labels).toEqual(exLabels);
});
});
describe('schedule', () => { describe('schedule', () => {
// prettier-ignore // prettier-ignore
// eslint-disable-next-line jest/expect-expect
test.each([ test.each([
[ [
'schedule01', 'schedule01',
@@ -2630,6 +3000,7 @@ describe('schedule', () => {
describe('release', () => { describe('release', () => {
// prettier-ignore // prettier-ignore
// eslint-disable-next-line jest/expect-expect
test.each([ test.each([
[ [
'release01', 'release01',
@@ -2696,6 +3067,7 @@ describe('release', () => {
describe('raw', () => { describe('raw', () => {
// prettier-ignore // prettier-ignore
// eslint-disable-next-line jest/expect-expect
test.each([ test.each([
[ [
'raw01', 'raw01',
@@ -3065,6 +3437,7 @@ describe('raw', () => {
describe('json', () => { describe('json', () => {
// prettier-ignore // prettier-ignore
// eslint-disable-next-line jest/expect-expect
test.each([ test.each([
[ [
'json01', 'json01',
@@ -3315,6 +3688,7 @@ describe('json', () => {
describe('bake', () => { describe('bake', () => {
// prettier-ignore // prettier-ignore
// eslint-disable-next-line jest/expect-expect
test.each([ test.each([
[ [
'bake01', 'bake01',
@@ -3617,3 +3991,48 @@ describe('bake', () => {
expect(JSON.parse(fs.readFileSync(bakeFile, 'utf8'))).toEqual(exBakeDefinition); expect(JSON.parse(fs.readFileSync(bakeFile, 'utf8'))).toEqual(exBakeDefinition);
}); });
}); });
describe('sepTags', () => {
// prettier-ignore
// eslint-disable-next-line jest/expect-expect
test.each([
[
'sepTags01',
'event_push_dev.env',
{
images: ['user/app'],
tags: [
`type=ref,event=branch`,
`type=raw,my`,
`type=raw,custom`,
`type=raw,tags`
],
sepTags: " "
} as Inputs,
"user/app:dev user/app:my user/app:custom user/app:tags"
],
[
'sepTags02',
'event_push_dev.env',
{
images: ['user/app'],
tags: [
`type=ref,event=branch`,
`type=raw,my`,
`type=raw,custom`,
`type=raw,tags`
],
sepTags: ","
} as Inputs,
"user/app:dev,user/app:my,user/app:custom,user/app:tags"
]
])('given %p with %p event', async (name: string, envFile: string, inputs: Inputs, expTags: string) => {
process.env = dotenv.parse(fs.readFileSync(path.join(__dirname, 'fixtures', envFile)));
const context = github.context();
const repo = await github.repo(process.env.GITHUB_TOKEN || '');
const meta = new Meta({...getInputs(), ...inputs}, context, repo);
expect(meta.getTags().join(inputs.sepTags)).toEqual(expTags);
});
});

12
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

13
dist/licenses.txt generated vendored
View File

@@ -762,6 +762,19 @@ Permission to use, copy, modify, and/or distribute this software for any purpose
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
uuid
MIT
The MIT License (MIT)
Copyright (c) 2010-2020 Robert Kieffer and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
webidl-conversions webidl-conversions
BSD-2-Clause BSD-2-Clause
# The BSD 2-Clause License # The BSD 2-Clause License

View File

@@ -29,12 +29,12 @@
], ],
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@actions/core": "^1.6.0", "@actions/core": "^1.10.0",
"@actions/github": "^5.0.1", "@actions/github": "^5.1.1",
"@renovate/pep440": "^1.0.0", "@renovate/pep440": "^1.0.0",
"csv-parse": "^5.0.4", "csv-parse": "^5.3.1",
"handlebars": "^4.7.7", "handlebars": "^4.7.7",
"moment": "^2.29.3", "moment": "^2.29.4",
"semver": "^7.3.7" "semver": "^7.3.7"
}, },
"devDependencies": { "devDependencies": {

View File

@@ -1,9 +1,8 @@
import {parse} from 'csv-parse/sync';
import * as core from '@actions/core';
import {issueCommand} from '@actions/core/lib/command';
import * as fs from 'fs'; import * as fs from 'fs';
import * as os from 'os'; import * as os from 'os';
import * as path from 'path'; import * as path from 'path';
import * as core from '@actions/core';
import {parse} from 'csv-parse/sync';
let _tmpDir: string; let _tmpDir: string;
@@ -31,8 +30,8 @@ export function getInputs(): Inputs {
tags: getInputList('tags', true), tags: getInputList('tags', true),
flavor: getInputList('flavor', true), flavor: getInputList('flavor', true),
labels: getInputList('labels', true), labels: getInputList('labels', true),
sepTags: core.getInput('sep-tags') || `\n`, sepTags: core.getInput('sep-tags', {trimWhitespace: false}) || `\n`,
sepLabels: core.getInput('sep-labels') || `\n`, sepLabels: core.getInput('sep-labels', {trimWhitespace: false}) || `\n`,
bakeTarget: core.getInput('bake-target') || `docker-metadata-action`, bakeTarget: core.getInput('bake-target') || `docker-metadata-action`,
githubToken: core.getInput('github-token') githubToken: core.getInput('github-token')
}; };
@@ -73,8 +72,3 @@ 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: unknown): void {
issueCommand('set-output', {name}, value);
}

View File

@@ -1,5 +1,5 @@
import * as fs from 'fs'; import * as fs from 'fs';
import {getInputs, Inputs, setOutput} from './context'; import {getInputs, Inputs} from './context';
import * as github from './github'; import * as github from './github';
import {Meta, Version} from './meta'; import {Meta, Version} from './meta';
import * as core from '@actions/core'; import * as core from '@actions/core';
@@ -41,7 +41,7 @@ async function run() {
core.info(version.main || ''); core.info(version.main || '');
core.endGroup(); core.endGroup();
} }
setOutput('version', version.main || ''); core.setOutput('version', version.main || '');
// Docker tags // Docker tags
const tags: Array<string> = meta.getTags(); const tags: Array<string> = meta.getTags();
@@ -54,7 +54,7 @@ async function run() {
} }
core.endGroup(); core.endGroup();
} }
setOutput('tags', tags.join(inputs.sepTags)); core.setOutput('tags', tags.join(inputs.sepTags));
// Docker labels // Docker labels
const labels: Array<string> = meta.getLabels(); const labels: Array<string> = meta.getLabels();
@@ -63,21 +63,21 @@ async function run() {
core.info(label); core.info(label);
} }
core.endGroup(); core.endGroup();
setOutput('labels', labels.join(inputs.sepLabels)); core.setOutput('labels', labels.join(inputs.sepLabels));
// JSON // JSON
const jsonOutput = meta.getJSON(); const jsonOutput = meta.getJSON();
core.startGroup(`JSON output`); core.startGroup(`JSON output`);
core.info(JSON.stringify(jsonOutput, null, 2)); core.info(JSON.stringify(jsonOutput, null, 2));
core.endGroup(); core.endGroup();
setOutput('json', jsonOutput); core.setOutput('json', jsonOutput);
// Bake definition file // Bake file definition
const bakeFile: string = meta.getBakeFile(); const bakeFile: string = meta.getBakeFile();
core.startGroup(`Bake definition file`); core.startGroup(`Bake file definition`);
core.info(fs.readFileSync(bakeFile, 'utf8')); core.info(fs.readFileSync(bakeFile, 'utf8'));
core.endGroup(); core.endGroup();
setOutput('bake-file', bakeFile); core.setOutput('bake-file', bakeFile);
} catch (error) { } catch (error) {
core.setFailed(error.message); core.setFailed(error.message);
} }

View File

@@ -37,6 +37,15 @@ export class Meta {
context.ref = `refs/pull/${context.payload.number}/merge`; context.ref = `refs/pull/${context.payload.number}/merge`;
} }
// DOCKER_METADATA_PR_HEAD_SHA env var can be used to set associated head
// SHA instead of commit SHA that triggered the workflow on pull request
// event.
if (/true/i.test(process.env.DOCKER_METADATA_PR_HEAD_SHA || '')) {
if ((/pull_request/.test(context.eventName) || /pull_request_target/.test(context.eventName)) && context.payload?.pull_request?.head?.sha != undefined) {
context.sha = context.payload.pull_request.head.sha;
}
}
this.inputs = inputs; this.inputs = inputs;
this.context = context; this.context = context;
this.repo = repo; this.repo = repo;
@@ -301,7 +310,7 @@ export class Meta {
let val = this.context.sha; let val = this.context.sha;
if (tag.attrs['format'] === tcl.ShaFormat.Short) { if (tag.attrs['format'] === tcl.ShaFormat.Short) {
val = this.context.sha.substr(0, 7); val = this.context.sha.substring(0, 7);
} }
const vraw = this.setValue(val, tag); const vraw = this.setValue(val, tag);
@@ -367,7 +376,7 @@ export class Meta {
return ctx.ref.replace(/^refs\/tags\//g, ''); return ctx.ref.replace(/^refs\/tags\//g, '');
}, },
sha: function () { sha: function () {
return ctx.sha.substr(0, 7); return ctx.sha.substring(0, 7);
}, },
base_ref: function () { base_ref: function () {
if (/^refs\/tags\//.test(ctx.ref) && ctx.payload?.base_ref != undefined) { if (/^refs\/tags\//.test(ctx.ref) && ctx.payload?.base_ref != undefined) {

View File

@@ -1,3 +1,3 @@
# syntax=docker/dockerfile:1
FROM alpine FROM alpine
RUN echo "Hello world!" RUN echo "Hello world!"

View File

@@ -2,29 +2,30 @@
# yarn lockfile v1 # yarn lockfile v1
"@actions/core@^1.6.0": "@actions/core@^1.10.0":
version "1.6.0" version "1.10.0"
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.6.0.tgz#0568e47039bfb6a9170393a73f3b7eb3b22462cb" resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.0.tgz#44551c3c71163949a2f06e94d9ca2157a0cfac4f"
integrity sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw== integrity sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==
dependencies: dependencies:
"@actions/http-client" "^1.0.11" "@actions/http-client" "^2.0.1"
uuid "^8.3.2"
"@actions/github@^5.0.1": "@actions/github@^5.1.1":
version "5.0.1" version "5.1.1"
resolved "https://registry.yarnpkg.com/@actions/github/-/github-5.0.1.tgz#5fdbe371d9a592038668be95d12421361585fba1" resolved "https://registry.yarnpkg.com/@actions/github/-/github-5.1.1.tgz#40b9b9e1323a5efcf4ff7dadd33d8ea51651bbcb"
integrity sha512-JZGyPM9ektb8NVTTI/2gfJ9DL7Rk98tQ7OVyTlgTuaQroariRBsOnzjy0I2EarX4xUZpK88YyO503fhmjFdyAg== integrity sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==
dependencies: dependencies:
"@actions/http-client" "^1.0.11" "@actions/http-client" "^2.0.1"
"@octokit/core" "^3.6.0" "@octokit/core" "^3.6.0"
"@octokit/plugin-paginate-rest" "^2.17.0" "@octokit/plugin-paginate-rest" "^2.17.0"
"@octokit/plugin-rest-endpoint-methods" "^5.13.0" "@octokit/plugin-rest-endpoint-methods" "^5.13.0"
"@actions/http-client@^1.0.11": "@actions/http-client@^2.0.1":
version "1.0.11" version "2.0.1"
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-1.0.11.tgz#c58b12e9aa8b159ee39e7dd6cbd0e91d905633c0" resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.0.1.tgz#873f4ca98fe32f6839462a6f046332677322f99c"
integrity sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg== integrity sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==
dependencies: dependencies:
tunnel "0.0.6" tunnel "^0.0.6"
"@ampproject/remapping@^2.1.0": "@ampproject/remapping@^2.1.0":
version "2.1.2" version "2.1.2"
@@ -1604,10 +1605,10 @@ cssstyle@^2.3.0:
dependencies: dependencies:
cssom "~0.3.6" cssom "~0.3.6"
csv-parse@*, csv-parse@^5.0.4: csv-parse@*, csv-parse@^5.3.1:
version "5.0.4" version "5.3.1"
resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-5.0.4.tgz#97e5e654413bcf95f2714ce09bcb2be6de0eb8e3" resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-5.3.1.tgz#78b028eb2d2a3e16e62ee8abe710ff7a0b1f8b3b"
integrity sha512-5AIdl8l6n3iYQYxan5djB5eKDa+vBnhfWZtRpJTcrETWfVLYN0WSj3L9RwvgYt+psoO77juUr8TG8qpfGZifVQ== integrity sha512-R4Hv6eGJNzgcKdThZ6XORbSQ873HVcNke74QIq+LbwpT90LaZ8Xzl7KKiuIP16xq/P7ofzRt0h7S0xm+fVScsw==
data-urls@^2.0.0: data-urls@^2.0.0:
version "2.0.0" version "2.0.0"
@@ -2953,10 +2954,10 @@ minimist@^1.2.5:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
moment@^2.29.3: moment@^2.29.4:
version "2.29.3" version "2.29.4"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.3.tgz#edd47411c322413999f7a5940d526de183c031f3" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
integrity sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw== integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
ms@2.1.2: ms@2.1.2:
version "2.1.2" version "2.1.2"
@@ -3553,7 +3554,7 @@ tsutils@^3.21.0:
dependencies: dependencies:
tslib "^1.8.1" tslib "^1.8.1"
tunnel@0.0.6: tunnel@^0.0.6:
version "0.0.6" version "0.0.6"
resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c"
integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==
@@ -3621,6 +3622,11 @@ uri-js@^4.2.2:
dependencies: dependencies:
punycode "^2.1.0" punycode "^2.1.0"
uuid@^8.3.2:
version "8.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
v8-compile-cache-lib@^3.0.0: v8-compile-cache-lib@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz#0582bcb1c74f3a2ee46487ceecf372e46bce53e8" resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz#0582bcb1c74f3a2ee46487ceecf372e46bce53e8"