Compare commits

...

15 Commits

Author SHA1 Message Date
CrazyMax
9be43f076d Update CHANGELOG 2021-03-19 11:59:51 +01:00
dependabot[bot]
d541d2c17f Bump handlebars from 4.7.6 to 4.7.7 (#44)
* Bump handlebars from 4.7.6 to 4.7.7

Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.6 to 4.7.7.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...v4.7.7)

Signed-off-by: dependabot[bot] <support@github.com>

* Update generated content

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-03-19 11:28:33 +01:00
dependabot[bot]
cffefcd230 Bump csv-parse from 4.15.1 to 4.15.3 (#45)
Bumps [csv-parse](https://github.com/wdavidw/node-csv-parse) from 4.15.1 to 4.15.3.
- [Release notes](https://github.com/wdavidw/node-csv-parse/releases)
- [Changelog](https://github.com/adaltas/node-csv-parse/blob/master/CHANGELOG.md)
- [Commits](https://github.com/wdavidw/node-csv-parse/compare/v4.15.1...v4.15.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2021-03-19 09:58:20 +01:00
CrazyMax
00e310993c Ignore commas for label-custom input (#48)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-03-19 09:55:45 +01:00
CrazyMax
e696b8439a Rename Dockerfile 2021-03-19 09:51:52 +01:00
CrazyMax
b334567bf3 Fix SHA 2021-03-19 00:32:29 +01:00
CrazyMax
7b49f7ed90 Use SHAs 2021-03-18 19:23:59 +01:00
CrazyMax
e08ef4ca63 Add label sponsor 2021-03-18 19:02:39 +01:00
CrazyMax
5f29dbc7d7 Move to docker/bake-action 2021-02-09 20:54:44 +01:00
dependabot[bot]
94e634192d Bump csv-parse from 4.14.2 to 4.15.1 (#42)
* Bump csv-parse from 4.14.2 to 4.15.1

Bumps [csv-parse](https://github.com/wdavidw/node-csv-parse) from 4.14.2 to 4.15.1.
- [Release notes](https://github.com/wdavidw/node-csv-parse/releases)
- [Changelog](https://github.com/adaltas/node-csv-parse/blob/master/CHANGELOG.md)
- [Commits](https://github.com/wdavidw/node-csv-parse/compare/v4.14.2...v4.15.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Update generated content

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-02-03 18:11:37 +00:00
CrazyMax
cae03854eb Update labels 2021-02-03 18:20:30 +01:00
CrazyMax
0a412843f8 2021 2021-01-06 19:03:30 +01:00
CrazyMax
9ae6899cfa Update CHANGELOG 2020-12-24 16:47:13 +01:00
CrazyMax
db66d4df79 Inject DOCKER_META_IMAGES and DOCKER_META_VERSION args in bake definition (#37)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-12-24 15:45:28 +00:00
CrazyMax
b500d9c7b5 Missing entry in action.yml 2020-12-24 14:06:20 +01:00
16 changed files with 211 additions and 69 deletions

22
.github/labels.yml vendored
View File

@@ -47,26 +47,34 @@
name: ":pray: help wanted" name: ":pray: help wanted"
color: "4caf50" color: "4caf50"
description: "" description: ""
- # hold
name: ":hand: hold"
color: "24292f"
description: ""
- # invalid - # invalid
name: ":no_entry_sign: invalid" name: ":no_entry_sign: invalid"
color: "e6e6e6" color: "e6e6e6"
description: "" description: ""
- # maybe bug - # investigate
name: ":interrobang: maybe bug" name: ":mag: investigate"
color: "ff5722" color: "e6625b"
description: "" description: ""
- # needs more info - # needs more info
name: ":thinking: needs more info" name: ":thinking: needs more info"
color: "795548" color: "795548"
description: "" description: ""
- # pinned
name: ":pushpin: pinned"
color: "28008e"
description: ""
- # question - # question
name: ":question: question" name: ":question: question"
color: "3f51b5" color: "3f51b5"
description: "" description: ""
- # sponsor
name: ":sparkling_heart: sponsor"
color: "fedbf0"
description: ""
- # stale
name: ":skull: stale"
color: "237da0"
description: ""
- # upstream - # upstream
name: ":eyes: upstream" name: ":eyes: upstream"
color: "fbca04" color: "fbca04"

3
.github/stale.yml vendored
View File

@@ -4,7 +4,8 @@ daysUntilStale: 30
daysUntilClose: 7 daysUntilClose: 7
# Issues with these labels will never be considered stale # Issues with these labels will never be considered stale
exemptLabels: exemptLabels:
- ":hand: hold" - ":pushpin: pinned"
- ":game_die: dependencies"
# Set to true to ignore issues in a milestone (defaults to false) # Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: true exemptMilestones: true
# Label to use when marking an issue as stale # Label to use when marking an issue as stale

View File

@@ -205,7 +205,7 @@ jobs:
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
- -
name: Build name: Build
uses: crazy-max/ghaction-docker-buildx-bake@v1 uses: docker/bake-action@v1
with: with:
files: | files: |
./test/docker-bake.hcl ./test/docker-bake.hcl

21
.github/workflows/label-sponsor.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: label-sponsor
on:
pull_request:
types:
- 'opened'
issues:
types:
- 'opened'
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Set sponsor label
uses: JasonEtco/is-sponsor-label-action@024ac24f8b170abce078cad4ee748852369853c8
with:
label: ":sparkling_heart: sponsor"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,5 +1,19 @@
# Changelog # Changelog
## 1.12.0 (2021/03/19)
* Ignore commas for `label-custom` input (#48)
* Bump handlebars from 4.7.6 to 4.7.7 (#44)
* Bump csv-parse from 4.14.2 to 4.15.3 (#42 #45)
## 1.11.0 (2020/12/24)
* Inject `DOCKER_META_IMAGES` and `DOCKER_META_VERSION` args in bake definition (#37)
## 1.10.1 (2020/12/24)
* Missing entry in `action.yml`
## 1.10.0 (2020/12/24) ## 1.10.0 (2020/12/24)
* Add `bake-file` output (#36) * Add `bake-file` output (#36)

View File

@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2020 CrazyMax Copyright (c) 2020-2021 CrazyMax
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -159,8 +159,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 Buildx Bake action](https://github.com/crazy-max/ghaction-docker-buildx-bake). You just have to declare a [Docker Bake action](https://github.com/docker/bake-action). You just have to declare an empty target named
target named `ghaction-docker-meta`. `ghaction-docker-meta` and inherit from it.
```hcl ```hcl
// docker-bake.hcl // docker-bake.hcl
@@ -211,7 +211,7 @@ jobs:
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
- -
name: Build name: Build
uses: crazy-max/ghaction-docker-buildx-bake@v1 uses: docker/bake-action@v1
with: with:
files: | files: |
./docker-bake.hcl ./docker-bake.hcl
@@ -220,6 +220,36 @@ jobs:
build build
``` ```
Content of `${{ steps.docker_meta.outputs.bake-file }}` file will look like this:
```json
{
"target": {
"ghaction-docker-meta": {
"tags": [
"name/app:1.1.1",
"name/app:1.1",
"name/app:latest"
],
"labels": {
"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": "1.1.1",
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
"org.opencontainers.image.licenses": "MIT"
},
"args": {
"DOCKER_META_IMAGES": "name/app",
"DOCKER_META_VERSION": "1.1.1"
}
}
}
}
```
## Customizing ## Customizing
### inputs ### inputs

View File

@@ -1512,6 +1512,10 @@ describe('bake-file', () => {
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z", "org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071", "org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
"org.opencontainers.image.licenses": "MIT" "org.opencontainers.image.licenses": "MIT"
},
"args": {
"DOCKER_META_IMAGES": "user/app",
"DOCKER_META_VERSION": "dev",
} }
} }
} }
@@ -1539,6 +1543,10 @@ describe('bake-file', () => {
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z", "org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071", "org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
"org.opencontainers.image.licenses": "MIT" "org.opencontainers.image.licenses": "MIT"
},
"args": {
"DOCKER_META_IMAGES": "user/app",
"DOCKER_META_VERSION": "dev",
} }
} }
} }
@@ -1569,6 +1577,10 @@ describe('bake-file', () => {
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z", "org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071", "org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
"org.opencontainers.image.licenses": "MIT" "org.opencontainers.image.licenses": "MIT"
},
"args": {
"DOCKER_META_IMAGES": "user/app",
"DOCKER_META_VERSION": "release1",
} }
} }
} }
@@ -1600,6 +1612,10 @@ describe('bake-file', () => {
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z", "org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071", "org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
"org.opencontainers.image.licenses": "MIT" "org.opencontainers.image.licenses": "MIT"
},
"args": {
"DOCKER_META_IMAGES": "user/app",
"DOCKER_META_VERSION": "20200110",
} }
} }
} }
@@ -1640,6 +1656,10 @@ describe('bake-file', () => {
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z", "org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071", "org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
"org.opencontainers.image.licenses": "MIT" "org.opencontainers.image.licenses": "MIT"
},
"args": {
"DOCKER_META_IMAGES": "org/app,ghcr.io/user/app",
"DOCKER_META_VERSION": "1.1.1",
} }
} }
} }
@@ -1673,6 +1693,10 @@ describe('bake-file', () => {
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z", "org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071", "org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
"org.opencontainers.image.licenses": "MIT" "org.opencontainers.image.licenses": "MIT"
},
"args": {
"DOCKER_META_IMAGES": "org/app,ghcr.io/user/app",
"DOCKER_META_VERSION": "my",
} }
} }
} }
@@ -1707,6 +1731,10 @@ describe('bake-file', () => {
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z", "org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071", "org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
"org.opencontainers.image.licenses": "MIT" "org.opencontainers.image.licenses": "MIT"
},
"args": {
"DOCKER_META_IMAGES": "org/app",
"DOCKER_META_VERSION": "v1.1.1",
} }
} }
} }

View File

@@ -50,6 +50,9 @@ inputs:
tag-custom-only: tag-custom-only:
description: 'Only use tag-custom as Docker tags' description: 'Only use tag-custom as Docker tags'
required: false required: false
label-custom:
description: 'List of custom labels'
required: false
sep-tags: sep-tags:
description: 'Separator to use for tags output (default \n)' description: 'Separator to use for tags output (default \n)'
required: false required: false

113
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -11,7 +11,7 @@ group "validate" {
} }
target "dockerfile" { target "dockerfile" {
dockerfile = "Dockerfile.dev" dockerfile = "dev.Dockerfile"
} }
target "update-yarn" { target "update-yarn" {

View File

@@ -25,8 +25,8 @@
"dependencies": { "dependencies": {
"@actions/core": "^1.2.6", "@actions/core": "^1.2.6",
"@actions/github": "^4.0.0", "@actions/github": "^4.0.0",
"csv-parse": "^4.14.2", "csv-parse": "^4.15.3",
"handlebars": "^4.7.6", "handlebars": "^4.7.7",
"moment": "^2.29.1", "moment": "^2.29.1",
"semver": "^7.3.4" "semver": "^7.3.4"
}, },

View File

@@ -44,7 +44,7 @@ export function getInputs(): Inputs {
tagSchedule: core.getInput('tag-schedule') || 'nightly', tagSchedule: core.getInput('tag-schedule') || 'nightly',
tagCustom: getInputList('tag-custom'), tagCustom: getInputList('tag-custom'),
tagCustomOnly: /true/i.test(core.getInput('tag-custom-only') || 'false'), tagCustomOnly: /true/i.test(core.getInput('tag-custom-only') || 'false'),
labelCustom: getInputList('label-custom'), labelCustom: getInputList('label-custom', true),
sepTags: core.getInput('sep-tags') || `\n`, sepTags: core.getInput('sep-tags') || `\n`,
sepLabels: core.getInput('sep-labels') || `\n`, sepLabels: core.getInput('sep-labels') || `\n`,
githubToken: core.getInput('github-token') githubToken: core.getInput('github-token')

View File

@@ -164,7 +164,11 @@ export class Meta {
target: { target: {
'ghaction-docker-meta': { 'ghaction-docker-meta': {
tags: this.tags(), tags: this.tags(),
labels: jsonLabels labels: jsonLabels,
args: {
DOCKER_META_IMAGES: this.inputs.images.join(','),
DOCKER_META_VERSION: this.version.main
}
} }
} }
}, },

View File

@@ -1176,10 +1176,10 @@ cssstyle@^2.2.0:
dependencies: dependencies:
cssom "~0.3.6" cssom "~0.3.6"
csv-parse@^4.14.2: csv-parse@^4.15.3:
version "4.14.2" version "4.15.3"
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.3.tgz#8a62759617a920c328cb31c351b05053b8f92b10"
integrity sha512-YE2xlTKtM035/94llhgsp9qFQxGi47EkQJ1pZ+mLT/98GpIsbjkMGAb7Rmu9hNxVfYFOLf10hP+rPVqnoccLgw== integrity sha512-jlTqDvLdHnYMSr08ynNfk4IAUSJgJjTKy2U5CQBSu4cN9vQOJonLVZP4Qo4gKKrIgIQ5dr07UwOJdi+lRqT12w==
dashdash@^1.12.0: dashdash@^1.12.0:
version "1.14.1" version "1.14.1"
@@ -1627,10 +1627,10 @@ growly@^1.3.0:
resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=
handlebars@^4.7.6: handlebars@^4.7.7:
version "4.7.6" version "4.7.7"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1"
integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==
dependencies: dependencies:
minimist "^1.2.5" minimist "^1.2.5"
neo-async "^2.6.0" neo-async "^2.6.0"