Compare commits

..
325 Commits
Author SHA1 Message Date
CrazyMax e1b7f96249 Merge pull request #338 from crazy-max/network
Add network input
2021-04-06 23:42:58 +02:00
CrazyMax 5a4a26c0fc Add network input
Signed-off-by: CrazyMax <[email protected]>
2021-04-06 14:49:15 +02:00
CrazyMax 8891861577 Merge pull request #337 from crazy-max/sort-inputs
Sort inputs
2021-04-06 13:56:35 +02:00
CrazyMax f6a733366a Sort inputs
Signed-off-by: CrazyMax <[email protected]>
2021-04-06 13:55:04 +02:00
CrazyMax eb4f14646c Merge pull request #331 from crazy-max/doc
Fix doc links
2021-04-06 13:11:23 +02:00
CrazyMax 646552f0a1 Fix doc links
Signed-off-by: CrazyMax <[email protected]>
2021-04-03 20:41:36 +02:00
CrazyMax 2ec8f1d346 Merge pull request #328 from crazy-max/github-serverurl
Handle GitHub server URL for default context
2021-04-01 23:59:21 +02:00
CrazyMax 8f5c91aad9 Handle GitHub server URL for default context
Signed-off-by: CrazyMax <[email protected]>
2021-04-01 20:07:51 +02:00
CrazyMax 6a12baa867 Merge pull request #325 from docker/dependabot/npm_and_yarn/y18n-4.0.1
Bump y18n from 4.0.0 to 4.0.1
2021-03-30 13:13:45 +02:00
dependabot[bot] da940a9403 Bump y18n from 4.0.0 to 4.0.1
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <[email protected]>
2021-03-29 21:52:47 +00:00
CrazyMax 9cf6eb2b16 Merge pull request #318 from docker/dependabot/npm_and_yarn/semver-7.3.5
Bump semver from 7.3.4 to 7.3.5
2021-03-29 23:51:27 +02:00
CrazyMax 3c2d8e5269 Update generated content
Signed-off-by: CrazyMax <[email protected]>
2021-03-29 23:47:36 +02:00
CrazyMax d693655c74 Merge pull request #323 from crazy-max/meta-v2
Meta action v2
2021-03-29 22:22:23 +02:00
CrazyMax bfea497a8e Merge pull request #322 from crazy-max/workflow
Enhance workflow
2021-03-29 22:09:29 +02:00
CrazyMax 8ca2ca55d4 Meta action v2
Signed-off-by: CrazyMax <[email protected]>
2021-03-29 14:33:52 +02:00
CrazyMax 460e0e47f5 Enhance workflow
Signed-off-by: CrazyMax <[email protected]>
2021-03-28 16:43:57 +02:00
dependabot[bot] edb2e175f1 Bump semver from 7.3.4 to 7.3.5
Bumps [semver](https://github.com/npm/node-semver) from 7.3.4 to 7.3.5.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.4...v7.3.5)

Signed-off-by: dependabot[bot] <[email protected]>
2021-03-23 05:56:49 +00:00
CrazyMax 09f8407c80 Merge pull request #303 from docker/dependabot/npm_and_yarn/csv-parse-4.15.3
Bump csv-parse from 4.15.1 to 4.15.3
2021-03-18 20:50:28 +01:00
dependabot[bot] 614833a85f Bump csv-parse from 4.15.1 to 4.15.3
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] <[email protected]>
2021-03-18 19:48:26 +00:00
CrazyMax 0ec1157bb5 Merge pull request #305 from TanguyChiffoleau/master
Fix wrong link for login action repo
2021-02-24 23:55:51 +01:00
Tanguy Chiffoleau 22d49d64f5 Fix wrong link for login action repo
Signed-off-by: TanguyChiffoleau <[email protected]>
2021-02-24 23:44:08 +01:00
CrazyMax 9379083e42 Merge pull request #299 from crazy-max/split-docs
Enhance documentation
2021-02-17 19:08:07 +01:00
CrazyMax a63b18dea2 Enhance documentation
Signed-off-by: CrazyMax <[email protected]>
2021-02-17 18:53:20 +01:00
CrazyMax af867d4937 Merge pull request #296 from crazy-max/secret-file
Allow to use secret file mount
2021-02-16 13:15:29 +01:00
CrazyMax 33eec1587d Update action.yml
Signed-off-by: CrazyMax <[email protected]>
2021-02-16 11:56:02 +01:00
CrazyMax 3db4797dd2 Merge pull request #298 from crazy-max/virtual-env
Enhance virtual-env workflow
2021-02-15 20:48:57 +01:00
CrazyMax 659fcba376 Enhance virtual-env workflow
Signed-off-by: CrazyMax <[email protected]>
2021-02-15 20:39:21 +01:00
CrazyMax 080cadd33e Allow to use secret file mount
Signed-off-by: CrazyMax <[email protected]>
2021-02-15 10:08:25 +01:00
CrazyMax dc4c1fca8b Merge pull request #297 from crazy-max/labels
Remove label workflow
2021-02-14 23:17:33 +01:00
CrazyMax b280b0485b Merge pull request #287 from docker/dependabot/npm_and_yarn/csv-parse-4.15.1
Bump csv-parse from 4.14.2 to 4.15.1
2021-02-14 23:13:24 +01:00
CrazyMax b87564a5cc Remove label workflow
Signed-off-by: CrazyMax <[email protected]>
2021-02-14 23:12:36 +01:00
CrazyMax d2bc6a5d16 Update generated content
Signed-off-by: CrazyMax <[email protected]>
2021-02-14 22:41:16 +01:00
CrazyMax e5f26cdae4 Merge pull request #295 from crazy-max/update-buildx
Update buildx
2021-02-14 22:30:37 +01:00
CrazyMax 616efcd405 Update buildx
Signed-off-by: CrazyMax <[email protected]>
2021-02-14 22:28:22 +01:00
dependabot[bot] 0539e1a717 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] <[email protected]>
2021-02-02 05:59:48 +00:00
Tõnis Tiigi 636b4540ec Merge pull request #273 from crazy-max/fix-workflow
Fix workflow for auto-push impl
2021-01-15 19:36:02 -08:00
CrazyMax af932bfb2e Fix workflow for auto-push impl
Signed-off-by: CrazyMax <[email protected]>
2021-01-15 19:21:19 +01:00
CrazyMax 2db03de115 Merge pull request #272 from crazy-max/virtual-env
Add virtual-env workflow
2021-01-15 19:17:18 +01:00
CrazyMax 4643aec7c4 Add virtual-env workflow
Signed-off-by: CrazyMax <[email protected]>
2021-01-15 19:13:45 +01:00
CrazyMax 4a531fa5a6 Merge pull request #267 from agabani/patch-1
Fix README
2021-01-01 22:41:37 +01:00
Ahmed Agabani 565d16e074 Fix README
Signed-off-by: agabani <[email protected]>
2021-01-01 03:26:46 +00:00
Tõnis Tiigi c473874c2c Merge pull request #244 from liboz/master
Use default behavior for file flag
2020-12-29 11:17:34 -08:00
CrazyMax b94cedd686 Merge pull request #266 from crazy-max/add-labels
Add registry issue labels
2020-12-29 19:06:18 +01:00
CrazyMax 76c8b42a58 Add registry issue labels
Signed-off-by: CrazyMax <[email protected]>
2020-12-29 18:51:10 +01:00
CrazyMax 920f0da143 Merge pull request #261 from crazy-max/e2e-gar
Add e2e tests for GAR
2020-12-22 17:44:55 +01:00
CrazyMax e723b420bf Add e2e tests for GAR
Signed-off-by: CrazyMax <[email protected]>
2020-12-22 17:42:19 +01:00
CrazyMax f9deaa080c Merge pull request #260 from crazy-max/e2e-gcr
Add e2e tests for GCR
2020-12-22 11:24:13 +01:00
CrazyMax b4c22c3e33 Add e2e tests for GCR
Signed-off-by: CrazyMax <[email protected]>
2020-12-22 11:21:32 +01:00
Libo Zeng a8587cb818 use default docker command line values for file when it is missing
Signed-off-by: Libo Zeng <[email protected]>
2020-12-18 10:49:11 -05:00
CrazyMax f2a733f179 Merge pull request #255 from docker/dependabot/npm_and_yarn/csv-parse-4.14.2
Bump csv-parse from 4.14.1 to 4.14.2
2020-12-17 23:19:07 +01:00
CrazyMax 35ab0dd217 Update generated content
Signed-off-by: CrazyMax <[email protected]>
2020-12-17 23:16:55 +01:00
CrazyMax 46d5afd128 Merge pull request #257 from crazy-max/fix-public-ecr
Fix public ECR slug and add cache to registry
2020-12-17 15:27:43 +01:00
CrazyMax a8bb35be5a Fix public ECR slug and add cache to regitry
Signed-off-by: CrazyMax <[email protected]>
2020-12-17 14:56:10 +01:00
CrazyMax 5c278cd8ab Merge pull request #256 from crazy-max/e2e-ecr
Add e2e tests for ECR
2020-12-17 12:11:44 +01:00
CrazyMax 3b98ff3c03 Add e2e tests for ECR
Signed-off-by: CrazyMax <[email protected]>
2020-12-17 12:06:34 +01:00
dependabot[bot] 6b88c3e647 Bump csv-parse from 4.14.1 to 4.14.2
Bumps [csv-parse](https://github.com/wdavidw/node-csv-parse) from 4.14.1 to 4.14.2.
- [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.1...v4.14.2)

Signed-off-by: dependabot[bot] <[email protected]>
2020-12-17 06:18:28 +00:00
CrazyMax 0db984c182 Merge pull request #250 from crazy-max/master
Typo in README
2020-12-05 03:53:54 +01:00
CrazyMax 35e3637576 Typo in README
Signed-off-by: CrazyMax <[email protected]>
2020-12-05 03:52:01 +01:00
CrazyMax a29353b5c7 Merge pull request #243 from docker/dependabot/npm_and_yarn/semver-7.3.4
Bump semver from 7.3.2 to 7.3.4
2020-12-05 03:50:01 +01:00
CrazyMax 241c03788f Update generated content
Signed-off-by: CrazyMax <[email protected]>
2020-12-05 03:45:58 +01:00
CrazyMax a6ea296fed Merge pull request #249 from crazy-max/trim-inputlist-items
Trim input list items
2020-12-05 03:42:27 +01:00
CrazyMax 13137a8f9b Trim input list items
Signed-off-by: CrazyMax <[email protected]>
2020-12-05 03:40:44 +01:00
CrazyMax 22b2fa68fc Merge pull request #246 from malkam03/h-doubled-quotes
Update documentation on escaping quotes
2020-12-03 23:41:19 +01:00
Malcolm Davis Steele 9ada3141a9 Apply suggestions
Signed-off-by: Malcolm Davis Steele <[email protected]>
2020-12-03 16:39:04 -06:00
Malcolm Davis Steele e53bafea73 Update documentation on escaping quotes
Signed-off-by: Malcolm Davis Steele <[email protected]>
2020-12-03 16:25:25 -06:00
dependabot[bot] b9335d6c83 Bump semver from 7.3.2 to 7.3.4
Bumps [semver](https://github.com/npm/node-semver) from 7.3.2 to 7.3.4.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.2...v7.3.4)

Signed-off-by: dependabot[bot] <[email protected]>
2020-12-02 06:19:44 +00:00
CrazyMax d51711af0d Merge pull request #241 from crazy-max/fix-readme
Fix README
2020-11-30 13:32:46 +01:00
CrazyMax b0a38c7db9 Fix README
Signed-off-by: CrazyMax <[email protected]>
2020-11-30 13:29:17 +01:00
CrazyMax 6925f94b6b Merge pull request #236 from crazy-max/master
Fix e2e workflow syntax
2020-11-19 23:58:10 +01:00
CrazyMax bf3d577ea5 Fix e2e workflow syntax
Signed-off-by: CrazyMax <[email protected]>
2020-11-19 23:56:28 +01:00
CrazyMax 1f1cc26e46 Merge pull request #235 from crazy-max/e2e
Add e2e tests
2020-11-19 23:52:02 +01:00
CrazyMax 3c98919e7f Add e2e tests
Signed-off-by: CrazyMax <[email protected]>
2020-11-19 10:40:39 +01:00
Tõnis Tiigi eae00c3028 Merge pull request #233 from crazy-max/secret-multiline
Handle multi-line secret value
2020-11-17 12:45:24 -08:00
CrazyMax 1471dfb80d Handle multi-line secret value
Signed-off-by: CrazyMax <[email protected]>
2020-11-17 21:38:51 +01:00
CrazyMax 9c13ff40b3 Merge pull request #231 from docker/dependabot/npm_and_yarn/csv-parse-4.14.1
Bump csv-parse from 4.14.0 to 4.14.1
2020-11-17 10:19:52 +01:00
CrazyMax 61a74b1e3a Merge pull request #232 from crazy-max/actions-major
Use major version of actions
2020-11-17 10:11:11 +01:00
CrazyMax d3ddc4b4ef Use major version of actions
Signed-off-by: CrazyMax <[email protected]>
2020-11-17 10:06:56 +01:00
dependabot[bot] 50caab8424 Bump csv-parse from 4.14.0 to 4.14.1
Bumps [csv-parse](https://github.com/wdavidw/node-csv-parse) from 4.14.0 to 4.14.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.0...v4.14.1)

Signed-off-by: dependabot[bot] <[email protected]>
2020-11-17 06:17:23 +00:00
CrazyMax d971423a6f Merge pull request #221 from andygrunwald/fix-label-opencontainers.image.source
Set container label "org.opencontainers.image.source" to establish a repository connection on github
2020-11-08 20:55:03 +01:00
Andy GrunwaldandCrazyMax ae5ee4ca11 Update UPGRADE.md: Use github.event.repository.html_url to craft the repository url
Co-authored-by: CrazyMax <[email protected]>
Signed-off-by: Andy Grunwald <[email protected]>
2020-11-08 20:50:59 +01:00
Andy Grunwald 3c6bad5f82 Set container label "org.opencontainers.image.source" to establish a repository connection on github
Signed-off-by: Andy Grunwald <[email protected]>
2020-11-08 20:16:03 +01:00
CrazyMax 6e1d94b6b3 Merge pull request #218 from docker/dependabot/npm_and_yarn/csv-parse-4.14.0
Bump csv-parse from 4.12.0 to 4.14.0
2020-11-06 15:07:33 +01:00
CrazyMax 11ca7847e4 Merge pull request #216 from docker/dependabot/github_actions/actions/checkout-v2.3.4
Bump actions/checkout from v2.3.3 to v2.3.4
2020-11-06 14:57:33 +01:00
CrazyMax 35f1834293 Update generated content
Signed-off-by: CrazyMax <[email protected]>
2020-11-06 14:56:57 +01:00
CrazyMax d651be4597 Merge pull request #189 from jtomaszewski/patch-1
docs(README): Improve example of `file` option so it's obvious that it is not relative to `context` option
2020-11-06 14:34:22 +01:00
Jacek Tomaszewski 8832f2902d docs(README): Improve example of file option so it's obvious that it is not relative to context option
Signed-off-by: Jacek Tomaszewski <[email protected]>
2020-11-06 14:26:21 +01:00
dependabot[bot] b6150991af Bump csv-parse from 4.12.0 to 4.14.0
Bumps [csv-parse](https://github.com/wdavidw/node-csv-parse) from 4.12.0 to 4.14.0.
- [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.12.0...v4.14.0)

Signed-off-by: dependabot[bot] <[email protected]>
2020-11-06 06:22:06 +00:00
dependabot[bot] 6b0583b656 Bump actions/checkout from v2.3.3 to v2.3.4
Bumps [actions/checkout](https://github.com/actions/checkout) from v2.3.3 to v2.3.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.3...5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f)

Signed-off-by: dependabot[bot] <[email protected]>
2020-11-04 06:20:47 +00:00
CrazyMax f96d0fb6b7 Merge pull request #213 from danlester/patch-1
Note that build_args has been renamed build-args
2020-11-03 21:11:08 +01:00
Dan Lester 9e2f4416f3 Note that build_args has been renamed build-args
Signed-off-by: Dan Lester <[email protected]>
2020-11-03 19:45:45 +00:00
CrazyMax 6efc2b01cb Merge pull request #206 from crazy-max/docker-meta
Simplify "Complete workflow" with Docker meta action
2020-10-28 19:59:35 +01:00
CrazyMax 953dc85723 Simplify "Complete workflow" with Docker meta action
Signed-off-by: CrazyMax <[email protected]>
2020-10-28 19:40:17 +01:00
Tõnis Tiigi 2e36e439bc Merge pull request #123 from sharesight/ssh-arg
Add support to pass `--ssh` flag to the build
2020-10-26 12:44:59 -07:00
Jesse Hills 6e7bd99c53 Run yarn pre-checkin again
Signed-off-by: Jesse Hills <[email protected]>
2020-10-27 07:56:10 +13:00
Jesse Hills fa61d38ad8 Add --ssh arg support
Signed-off-by: Jesse Hills <[email protected]>
2020-10-26 21:17:37 +13:00
Tõnis Tiigi 41a004098f Merge pull request #203 from crazy-max/update-troubleshooting
Update troubleshooting notes
2020-10-23 14:32:04 -07:00
Tõnis Tiigi 41b2c888ba Merge pull request #204 from crazy-max/cache-issue-fixed
Cache issue is now fixed
2020-10-23 14:30:44 -07:00
CrazyMax 72350a828e Cache issue is now fixed
Signed-off-by: CrazyMax <[email protected]>
2020-10-23 23:06:56 +02:00
CrazyMax 5f6cd6b99d Update troubleshooting notes
Signed-off-by: CrazyMax <[email protected]>
2020-10-23 22:51:59 +02:00
CrazyMax bef45c0027 Merge pull request #201 from mathieubergeron/fix-parse-secret-containing-equal-character
Fix parsing of secrets containing '=' character
2020-10-23 22:39:07 +02:00
Mathieu Bergeron c8e09bfd16 Merge remote-tracking branch 'upstream/master' into fix-parse-secret-containing-equal-character
# Conflicts:
#	__tests__/buildx.test.ts
2020-10-23 16:35:54 -04:00
CrazyMax b3b0ca3523 Merge pull request #202 from crazy-max/bake-dev
Container based developer flow
2020-10-23 22:25:15 +02:00
CrazyMax 0307a522bb Container based developer flow
Signed-off-by: CrazyMax <[email protected]>
2020-10-23 21:59:05 +02:00
Mathieu Bergeron 8616d520af Update dist/index.js
Signed-off-by: Mathieu Bergeron <[email protected]>
2020-10-23 15:02:42 -04:00
Mathieu Bergeron 21692b9878 Fix usage of deprecated substr (=> substring)
Signed-off-by: Mathieu Bergeron <[email protected]>
2020-10-23 13:49:33 -04:00
Mathieu Bergeron fc7e9a2b38 Fix parsing of secrets containing '=' character
Signed-off-by: Mathieu Bergeron <[email protected]>
2020-10-23 13:31:33 -04:00
Tõnis Tiigi c58c6870a2 Merge pull request #196 from crazy-max/check-status
Check desired output status
2020-10-22 18:31:53 -07:00
CrazyMax 25af97b442 Check desired output status
Signed-off-by: CrazyMax <[email protected]>
2020-10-23 00:38:33 +02:00
CrazyMax 5b4307de80 Merge pull request #198 from crazy-max/update-readme
Improve README
2020-10-22 23:56:32 +02:00
CrazyMax 28262c0ab5 Improve README
Signed-off-by: CrazyMax <[email protected]>
2020-10-22 21:50:22 +02:00
CrazyMax 99ba0e6cbf Merge pull request #195 from crazy-max/docker-driver
Throw error message instead of exit code
2020-10-21 21:49:45 +02:00
CrazyMax 5d3938fa17 Cleanup
Signed-off-by: CrazyMax <[email protected]>
2020-10-21 21:29:46 +02:00
CrazyMax 4d8e3c6c3b Merge pull request #194 from crazy-max/buildargs-example
Fix build-args example
2020-10-21 21:21:16 +02:00
CrazyMax de804a56b7 Throw error message instead of exit code
Signed-off-by: CrazyMax <[email protected]>
2020-10-21 21:07:57 +02:00
CrazyMax 07d2c320de Fix build-args example
Signed-off-by: CrazyMax <[email protected]>
2020-10-21 17:34:06 +02:00
CrazyMax 5af5c5fa9d Merge pull request #193 from crazy-max/enable-iidfile-multiplat
Enable iidfile for multi-platform
2020-10-21 09:55:46 +02:00
CrazyMax 29cf8ab8dc Enable iidfile for multi-platform
Signed-off-by: CrazyMax <[email protected]>
2020-10-21 09:51:12 +02:00
CrazyMax 999f006917 Merge pull request #192 from crazy-max/master
Fix tmpDir and defaultContext func
2020-10-21 02:54:03 +02:00
CrazyMax 71d586a48c Fix tmpDir and defaultContext func
Signed-off-by: CrazyMax <[email protected]>
2020-10-21 02:46:46 +02:00
Tõnis Tiigi 24a0b9628d Merge pull request #188 from crazy-max/fix-buildargs-labels-type
Labels and build args should not be handled as CSV type
2020-10-20 10:23:03 -07:00
CrazyMax 53401988c7 Labels and build args should not be handled as CSV type
Signed-off-by: CrazyMax <[email protected]>
2020-10-20 19:05:16 +02:00
CrazyMax 84306df16c Merge pull request #185 from crazy-max/fix-iidfile
Do not set --iidfile flag if local or tar exporters are used
2020-10-20 17:58:58 +02:00
CrazyMax 6751eb6bd5 Local if no type is defined for output
Signed-off-by: CrazyMax <[email protected]>
2020-10-20 17:53:03 +02:00
CrazyMax bf051e6237 Use csv-parse lib to parse outputs
Signed-off-by: CrazyMax <[email protected]>
2020-10-20 15:18:07 +02:00
CrazyMax 695ef9e5a5 Add minimal job
Signed-off-by: CrazyMax <[email protected]>
2020-10-19 22:17:35 +02:00
CrazyMax 75727aa23f Better parsing of outputs
Signed-off-by: CrazyMax <[email protected]>
2020-10-19 22:12:33 +02:00
CrazyMax fb848139a7 Update README
Signed-off-by: CrazyMax <[email protected]>
2020-10-19 21:39:06 +02:00
CrazyMax 5ab22b2b60 Merge pull request #184 from docker/dependabot/github_actions/codecov/codecov-action-v1.0.14
Bump codecov/codecov-action from v1.0.13 to v1.0.14
2020-10-19 21:22:57 +02:00
CrazyMax 08566ae0e1 Do not set --iidfile flag if local and tar exporters are used
More tests for context module

Signed-off-by: CrazyMax <[email protected]>
2020-10-19 21:17:12 +02:00
dependabot[bot] 64fe20b36e Bump codecov/codecov-action from v1.0.13 to v1.0.14
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.13 to v1.0.14.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.13...7d5dfa54903bd909319c580a00535b483d1efcf3)

Signed-off-by: dependabot[bot] <[email protected]>
2020-10-19 06:51:35 +00:00
CrazyMax d90dfadeb5 Merge pull request #183 from syntaqx/doc-fixes
Simple readme update for dockerhub-description
2020-10-18 21:08:24 +02:00
Chase Pierce 7d32c994b7 update readme for dockerhub-description
peter-evans/dockerhub-description uses `with` syntax rather than env
now, reflect that change.

Signed-off-by: Chase Pierce <[email protected]>
2020-10-18 11:17:37 -06:00
CrazyMax 3149cc2fd7 Merge pull request #176 from crazy-max/fix-ci-workflow
Fix ci workflow
2020-10-11 19:32:20 +02:00
CrazyMax 5b56278dbc Fix ci workflow
Signed-off-by: CrazyMax <[email protected]>
2020-10-11 19:17:08 +02:00
CrazyMax 2d55d887e4 Merge pull request #172 from crazy-max/update-troubleshooting
Update troubleshooting notes
2020-10-09 17:18:44 +02:00
CrazyMax 2fb322285c Merge pull request #170 from crazy-max/fix-complete-workflow
Fix complete workflow
2020-10-09 11:40:32 +02:00
CrazyMax 6f2047153d Update troubleshooting notes
Signed-off-by: CrazyMax <[email protected]>
2020-10-08 20:37:39 +02:00
CrazyMax fb65f04b1e Fix complete workflow
Signed-off-by: CrazyMax <[email protected]>
2020-10-08 15:11:44 +02:00
CrazyMax a2e29921b7 Merge pull request #157 from crazy-max/more-examples
Examples to push to multi-registries and cache to registry
2020-10-04 02:46:41 +02:00
CrazyMax 3da3f281a0 Examples to push to multi-registries (#154) and cache to registry
Signed-off-by: CrazyMax <[email protected]>
2020-10-04 01:24:41 +02:00
CrazyMax 818fbc8101 Merge pull request #156 from crazy-max/enhanced-ci-workflow
Enhanced git context and cache workflow
2020-10-04 01:17:02 +02:00
CrazyMax 9e2936f9ed Writes cache metadata into the image configuration
Signed-off-by: CrazyMax <[email protected]>
2020-10-04 01:10:51 +02:00
CrazyMax 5538ea42ec Add registry cache job
Signed-off-by: CrazyMax <[email protected]>
2020-10-04 00:01:23 +02:00
CrazyMax 499091e46b Check digests
Signed-off-by: CrazyMax <[email protected]>
2020-10-03 23:41:42 +02:00
CrazyMax ecc23e5785 Update README
Signed-off-by: CrazyMax <[email protected]>
2020-10-03 23:03:47 +02:00
CrazyMax a94448a773 Enhanced git context and cache workflow
Signed-off-by: CrazyMax <[email protected]>
2020-10-03 22:44:21 +02:00
CrazyMax c5789b4eb9 Merge pull request #155 from crazy-max/fix-git-context
Fix Git context
2020-10-03 22:32:07 +02:00
CrazyMax c24a92baa4 Fix Git context
Signed-off-by: CrazyMax <[email protected]>
2020-10-03 22:26:07 +02:00
CrazyMax b1b7db3498 Merge pull request #145 from docker/dependabot/github_actions/crazy-max/ghaction-github-labeler-v3.1.0
Bump crazy-max/ghaction-github-labeler from v3.0.0 to v3.1.0
2020-09-29 23:36:21 +02:00
CrazyMax fe024b2b06 Merge pull request #143 from crazy-max/upgrade-notes
Add upgrade notes
2020-09-29 10:12:20 +02:00
dependabot[bot] 4513bf8897 Bump crazy-max/ghaction-github-labeler from v3.0.0 to v3.1.0
Bumps [crazy-max/ghaction-github-labeler](https://github.com/crazy-max/ghaction-github-labeler) from v3.0.0 to v3.1.0.
- [Release notes](https://github.com/crazy-max/ghaction-github-labeler/releases)
- [Changelog](https://github.com/crazy-max/ghaction-github-labeler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crazy-max/ghaction-github-labeler/compare/v3.0.0...dbccbd0ebd1178b5942ba419c921b36525829588)

Signed-off-by: dependabot[bot] <[email protected]>
2020-09-29 06:14:30 +00:00
CrazyMax 9b234cb12f Changes
Signed-off-by: CrazyMax <[email protected]>
2020-09-29 02:40:54 +02:00
CrazyMax f76e1de265 Remove CHANGELOG (already available through GitHub releases)
Signed-off-by: CrazyMax <[email protected]>
2020-09-29 01:27:59 +02:00
CrazyMax 0b294e37ce Merge pull request #139 from docker/dependabot/npm_and_yarn/actions/core-1.2.6
Bump @actions/core from 1.2.5 to 1.2.6
2020-09-29 01:25:38 +02:00
CrazyMax 4dd58f369e Update generated content
Signed-off-by: CrazyMax <[email protected]>
2020-09-29 01:19:32 +02:00
CrazyMax 2b832c5b7e Add upgrade notes
Signed-off-by: CrazyMax <[email protected]>
2020-09-29 01:08:58 +02:00
CrazyMax ff640d300f Merge pull request #138 from docker/dependabot/github_actions/actions/checkout-v2.3.3
Bump actions/checkout from v2.3.2 to v2.3.3
2020-09-24 18:29:47 +02:00
dependabot[bot] e2249b968c Bump @actions/core from 1.2.5 to 1.2.6
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.5 to 1.2.6.
- [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)

Signed-off-by: dependabot[bot] <[email protected]>
2020-09-24 06:29:14 +00:00
dependabot[bot] b072fc7fae Bump actions/checkout from v2.3.2 to v2.3.3
Bumps [actions/checkout](https://github.com/actions/checkout) from v2.3.2 to v2.3.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.2...a81bbbf8298c0fa03ea29cdc473d45769f953675)

Signed-off-by: dependabot[bot] <[email protected]>
2020-09-24 06:25:40 +00:00
CrazyMax a2578e544b Merge pull request #136 from crazy-max/auto-git-token
Expose Git secret token if default context used
2020-09-23 11:23:48 +02:00
CrazyMax e952699f4d Fix CI workflow and README
Signed-off-by: CrazyMax <[email protected]>
2020-09-23 11:04:40 +02:00
CrazyMax 32351da9d7 Update CI workflow
Signed-off-by: CrazyMax <[email protected]>
2020-09-22 20:53:40 +02:00
CrazyMax 86856eb412 Expose Git secret token if default context used
Signed-off-by: CrazyMax <[email protected]>
2020-09-22 20:49:18 +02:00
CrazyMax 3a24abd18b Merge pull request #133 from crazy-max/troubleshooting-section
Add Troubleshooting section in README
2020-09-21 21:18:03 +02:00
CrazyMax 65a1a173ac Move to dedicated md
Signed-off-by: CrazyMax <[email protected]>
2020-09-21 21:06:04 +02:00
CrazyMax 5281740ad2 Add Troubleshooting section
Signed-off-by: CrazyMax <[email protected]>
2020-09-21 18:23:09 +02:00
CrazyMax 1f11648765 Merge pull request #129 from crazy-max/master
Fix README
2020-09-17 13:29:28 +02:00
CrazyMax 9d763a7ae2 Fxi README
Signed-off-by: CrazyMax <[email protected]>
2020-09-17 13:27:14 +02:00
CrazyMax ab651b3b16 Merge pull request #125 from itchyny/patch-1
Improve example for OCI Image Spec annotations
2020-09-16 00:12:03 +02:00
itchyny d60f174305 Update example action for labels
Signed-off-by: itchyny <[email protected]>
2020-09-16 03:36:39 +09:00
itchyny cc21f01876 Improve example for OCI Image Spec annotations
Fill in title, description and url labels based on the repository information.
Use repository clone URL from `github.event` instead of an undocumented variable.
Fix licenses label to follow SPDX License Expressions.

Signed-off-by: itchyny <[email protected]>
2020-09-16 03:32:04 +09:00
CrazyMax 6a3a81765c Merge pull request #122 from docker/dependabot/npm_and_yarn/node-fetch-2.6.1
Bump node-fetch from 2.6.0 to 2.6.1
2020-09-13 07:54:00 +02:00
dependabot[bot] c750a99048 Bump node-fetch from 2.6.0 to 2.6.1
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <[email protected]>
2020-09-13 05:31:42 +00:00
CrazyMax a368cdd67a Merge pull request #121 from crazy-max/fix-example
Fix example
2020-09-12 21:40:32 +02:00
CrazyMax f45dc4a7b8 Fix example
Signed-off-by: CrazyMax <[email protected]>
2020-09-12 21:38:49 +02:00
CrazyMax c32afc2f2d Merge pull request #119 from crazy-max/tags-handling-example
Add tags and labels handling example
2020-09-12 21:29:25 +02:00
CrazyMax 6fd2a708bd Update example workflow
Signed-off-by: CrazyMax <[email protected]>
2020-09-12 21:14:33 +02:00
CrazyMax 9a445780ad Fix events on CI workflow
Signed-off-by: CrazyMax <[email protected]>
2020-09-12 20:53:25 +02:00
CrazyMax 371daebc6f Update example with explanations
Signed-off-by: CrazyMax <[email protected]>
2020-09-12 20:40:18 +02:00
CrazyMax dbdfd86c1d Enhanced with OCI Image Format Specification labels
Signed-off-by: CrazyMax <[email protected]>
2020-09-12 01:45:05 +02:00
CrazyMax 28d7281ebf Cleanup
Signed-off-by: CrazyMax <[email protected]>
2020-09-11 00:53:06 +02:00
CrazyMax 83b2aeab47 Add tags handling example
Signed-off-by: CrazyMax <[email protected]>
2020-09-10 22:24:13 +02:00
CrazyMax 4b42944e12 Merge pull request #118 from crazy-max/use-dockerhub-token
Use DockerHub Token
2020-09-10 19:34:39 +02:00
CrazyMax 1f13e8e2d4 Use DockerHub Token
Signed-off-by: CrazyMax <[email protected]>
2020-09-10 18:46:50 +02:00
CrazyMax f38eb7faec Merge pull request #117 from crazy-max/update-repo-desc-example
Add example to update DockerHub repo description
2020-09-10 11:32:24 +02:00
CrazyMax f5974ebd2b Add example to update DockerHub repo description
Signed-off-by: CrazyMax <[email protected]>
2020-09-10 01:14:47 +02:00
CrazyMax c27a49bd68 Merge pull request #113 from crazy-max/fix-dependabot-labels
Fix dependabot labels
2020-09-09 16:18:49 +02:00
CrazyMax c78f7c3517 Fix dependabot labels
Signed-off-by: CrazyMax <[email protected]>
2020-09-09 16:18:06 +02:00
CrazyMax e8ee3d70c8 Merge pull request #112 from docker/dependabot/github_actions/codecov/codecov-action-v1.0.13
Bump codecov/codecov-action from v1.0.7 to v1.0.13
2020-09-09 09:14:33 +02:00
dependabot[bot] 520adf89c3 Bump codecov/codecov-action from v1.0.7 to v1.0.13
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.7 to v1.0.13.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.7...6004246f47ab62d32be025ce173b241cd84ac58e)

Signed-off-by: dependabot[bot] <[email protected]>
2020-09-09 05:51:00 +00:00
CrazyMax 1f582c9fe5 Merge pull request #109 from crazy-max/add-codecov
Add Codecov
2020-09-09 01:00:50 +02:00
CrazyMax 3eedc039be Merge pull request #111 from crazy-max/update-readme
Set setup-buildx and setup-qemu actions to v1
2020-09-09 00:45:01 +02:00
CrazyMax 4f52913403 Set setup-buildx and setup-qemu actions to v1
Signed-off-by: CrazyMax <[email protected]>
2020-09-09 00:32:40 +02:00
CrazyMax 725bbce13f Merge pull request #110 from crazy-max/fix-action-name
Fix action name
2020-09-09 00:07:34 +02:00
CrazyMax 894de2a378 Fix action name
Signed-off-by: CrazyMax <[email protected]>
2020-09-09 00:03:47 +02:00
CrazyMax 6c053f55dc Add Codecov
Signed-off-by: CrazyMax <[email protected]>
2020-09-08 23:34:53 +02:00
CrazyMax 4253125b47 Merge pull request #107 from docker/dependabot/github_actions/actions/checkout-v2.3.2
Bump actions/checkout from v2.3.1 to v2.3.2
2020-09-08 23:29:43 +02:00
CrazyMax 64c27ea551 Merge pull request #108 from docker/dependabot/npm_and_yarn/actions/core-1.2.5
Bump @actions/core from 1.2.4 to 1.2.5
2020-09-08 23:29:15 +02:00
dependabot[bot] 6493cd066b Bump @actions/core from 1.2.4 to 1.2.5
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.4 to 1.2.5.
- [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)

Signed-off-by: dependabot[bot] <[email protected]>
2020-09-08 21:18:06 +00:00
dependabot[bot] 865abb5a44 Bump actions/checkout from v2.3.1 to v2.3.2
Bumps [actions/checkout](https://github.com/actions/checkout) from v2.3.1 to v2.3.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.1...2036a08e25fa78bbd946711a407b529a0a1204bf)

Signed-off-by: dependabot[bot] <[email protected]>
2020-09-08 21:16:37 +00:00
Tõnis Tiigi b2462f3ff0 Merge pull request #104 from crazy-max/local-registry-example
Local registry example
2020-09-08 08:53:43 -07:00
CrazyMax b4bae2181a Simplify workflow
Signed-off-by: CrazyMax <[email protected]>
2020-09-08 11:26:06 +02:00
Tõnis Tiigi ebfdda24ef Merge pull request #103 from crazy-max/use-default-buildkitd-flags
Use default buildkitd flags (docker/setup-buildx-action#15)
2020-09-07 19:25:27 -07:00
CrazyMax c9c37b8060 Skip not needed
Signed-off-by: CrazyMax <[email protected]>
2020-09-05 15:34:15 +02:00
CrazyMax 562df850e8 Use service container
Signed-off-by: CrazyMax <[email protected]>
2020-09-05 05:18:15 +02:00
CrazyMax b0acf4a8d6 Add example with local registry
Signed-off-by: CrazyMax <[email protected]>
2020-09-05 05:18:00 +02:00
CrazyMax bd69f76d77 Use default buildkitd flags (docker/setup-buildx-action#15)
Signed-off-by: CrazyMax <[email protected]>
2020-09-05 03:32:07 +02:00
Tõnis Tiigi 85d408708d Merge pull request #102 from crazy-max/v2-fix-input-list
Exclude empty items from input list
2020-09-04 17:55:12 -07:00
CrazyMax 90d197d06b Exclude empty items from input list
Signed-off-by: CrazyMax <[email protected]>
2020-09-05 02:52:09 +02:00
Tõnis Tiigi e01a38bb45 Merge pull request #92 from docker/v2-build-push
Build Push action v2
2020-09-04 09:47:46 -07:00
CrazyMax ff910a3b64 Update CI workflow (docker/setup-buildx-action#14)
Signed-off-by: CrazyMax <[email protected]>
2020-09-03 18:17:27 +02:00
CrazyMax cf9301c704 Use --builder
Signed-off-by: CrazyMax <[email protected]>
2020-09-03 11:49:39 +02:00
CrazyMax b563df09ad Update README
Signed-off-by: CrazyMax <[email protected]>
2020-09-02 10:44:39 +02:00
CrazyMax f295fbf080 Add secrets input
Use Git as default context

Signed-off-by: CrazyMax <[email protected]>
2020-09-02 10:07:11 +02:00
CrazyMax bd6a01893d Add isolated builders example
Signed-off-by: CrazyMax <[email protected]>
2020-08-29 17:46:56 +02:00
CrazyMax 8954ded19b Ignore comma sep for CSV inputs type
Signed-off-by: CrazyMax <[email protected]>
2020-08-29 17:15:26 +02:00
CrazyMax c124ff0226 Add GitHub cache example
Signed-off-by: CrazyMax <[email protected]>
2020-08-29 16:10:05 +02:00
CrazyMax fbd19d2677 Update CHANGELOG
Signed-off-by: CrazyMax <[email protected]>
2020-08-28 01:28:38 +02:00
CrazyMax d72873cd8f Switch to docker/login-action
Signed-off-by: CrazyMax <[email protected]>
2020-08-27 15:08:11 +02:00
CrazyMax d8e8fa4354 Move setup-buildx and setup-qemu actions
Signed-off-by: CrazyMax <[email protected]>
2020-08-24 14:04:40 +02:00
CrazyMax 616a7811e4 Moved to https://github.com/docker/setup-qemu-action
Signed-off-by: CrazyMax <[email protected]>
2020-08-24 13:59:34 +02:00
CrazyMax 6810721b4e Moved to https://github.com/docker/setup-buildx-action
Signed-off-by: CrazyMax <[email protected]>
2020-08-24 13:59:21 +02:00
CrazyMax 2a794d5efe Use docker/setup-buildx-action and docker/setup-qemu-action
Signed-off-by: CrazyMax <[email protected]>
2020-08-24 13:54:16 +02:00
CrazyMax 1baa07036c Fix workflow
Signed-off-by: CrazyMax <[email protected]>
2020-08-23 04:07:29 +02:00
CrazyMax e13f2c26a1 Update workflow
Signed-off-by: CrazyMax <[email protected]>
2020-08-23 04:06:55 +02:00
CrazyMax 995fe3c38a Fix tests
Signed-off-by: CrazyMax <[email protected]>
2020-08-23 04:01:20 +02:00
CrazyMax e8186e990f Update tests
Signed-off-by: CrazyMax <[email protected]>
2020-08-23 03:36:35 +02:00
CrazyMax 3e57a3300a Check Buildx version
Signed-off-by: CrazyMax <[email protected]>
2020-08-23 03:31:38 +02:00
CrazyMax f11192a27b Update README
Signed-off-by: CrazyMax <[email protected]>
2020-08-21 17:31:03 +02:00
CrazyMax 595e5e8d62 Add dependabot
Add default reviewers

Signed-off-by: CrazyMax <[email protected]>
2020-08-21 17:19:56 +02:00
CrazyMax 1c21811610 Move zeit/ncc to vercel/ncc
Signed-off-by: CrazyMax <[email protected]>
2020-08-21 13:39:42 +02:00
CrazyMax aac8809ede Fix TOC
Signed-off-by: CrazyMax <[email protected]>
2020-08-20 17:28:17 +02:00
CrazyMax a2059ed789 Add note about dependabot
Signed-off-by: CrazyMax <[email protected]>
2020-08-20 17:25:55 +02:00
CrazyMax a1114bb0a0 Fix name
Signed-off-by: CrazyMax <[email protected]>
2020-08-20 15:09:19 +02:00
CrazyMax 65e18bfb3c Bug report template
CONTRIBUTING and SUPPORT guidelines

Signed-off-by: CrazyMax <[email protected]>
2020-08-19 21:52:47 +02:00
CrazyMax ea664df512 Add badges and screenshot
Signed-off-by: CrazyMax <[email protected]>
2020-08-19 21:46:12 +02:00
CrazyMax 52a6ac2d7a Add ref
Signed-off-by: CrazyMax <[email protected]>
2020-08-19 21:35:36 +02:00
CrazyMax c92227abdc Add CHANGELOG
Signed-off-by: CrazyMax <[email protected]>
2020-08-19 18:33:47 +02:00
CrazyMax 25fd13d2a5 Add complete workflow example
Signed-off-by: CrazyMax <[email protected]>
2020-08-18 22:54:44 +02:00
CrazyMax 38c1f188ca Add digest output
Fix platforms and allow inputs

Signed-off-by: CrazyMax <[email protected]>
2020-08-17 22:18:37 +02:00
CrazyMax 44d05b9191 Remove GitHub Cache support for now (future release or buildkit cache provider?)
Signed-off-by: CrazyMax <[email protected]>
2020-08-17 18:35:15 +02:00
CrazyMax 2962fe9789 Remove bake support for now (future release or subaction)
Signed-off-by: CrazyMax <[email protected]>
2020-08-17 18:26:46 +02:00
CrazyMax e7964906a6 Use url fragment for git ref context
Signed-off-by: CrazyMax <[email protected]>
2020-08-17 17:31:27 +02:00
CrazyMax 8413351ed4 Ignore subactions
Signed-off-by: CrazyMax <[email protected]>
2020-08-17 02:47:12 +02:00
CrazyMax ff03fa50a4 Inspect pushed image
Signed-off-by: CrazyMax <[email protected]>
2020-08-17 02:42:46 +02:00
CrazyMax e0b127751c Set buildkitd-flags for ci workflow
Signed-off-by: CrazyMax <[email protected]>
2020-08-17 02:37:37 +02:00
CrazyMax 1110973d9c Update ci workflow
Signed-off-by: CrazyMax <[email protected]>
2020-08-17 02:33:38 +02:00
CrazyMax 363c8ed24f Treat platforms and allow as a list
Signed-off-by: CrazyMax <[email protected]>
2020-08-17 02:32:27 +02:00
CrazyMax 512e4e994b Fix package name
Signed-off-by: CrazyMax <[email protected]>
2020-08-17 02:28:28 +02:00
CrazyMax fbd34eda32 Merge branch 'v2-working-branch' into v2-build-push
Signed-off-by: CrazyMax <[email protected]>
2020-08-17 01:06:14 +02:00
Tõnis Tiigi 068cb8e418 Merge pull request #93 from docker/v2-fix-setup-actions
Fix and cleanup of v2 setup actions
2020-08-16 16:02:43 -07:00
CrazyMax 1ae53ef326 Update README
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 23:34:08 +02:00
CrazyMax bf8b1bf979 Update ci workflow
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 23:15:54 +02:00
CrazyMax 6ede7e932d Fix cache restoreKeys
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 23:01:53 +02:00
CrazyMax bd7ed33c45 Typo
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 22:43:08 +02:00
CrazyMax 1ca381eec1 Compute args order
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 22:41:18 +02:00
CrazyMax 444d7e9909 Add post run
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 22:38:03 +02:00
CrazyMax 22acf7cb32 Test GitHub Cache
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 22:31:37 +02:00
CrazyMax 5003e0df3d Add Git context example
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 19:41:44 +02:00
CrazyMax 1c3fedb652 Use latest buildx for git context test
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 19:22:14 +02:00
CrazyMax 9c473659de Check context type
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 19:13:19 +02:00
CrazyMax 10b9d7ec22 Fix context url
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 18:21:00 +02:00
CrazyMax 7086e3777e Set file input
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 17:58:09 +02:00
CrazyMax 4bbd4aa946 Test git context
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 17:55:47 +02:00
CrazyMax 8913dd9900 Fix args
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 17:24:31 +02:00
CrazyMax 8be103ff82 Handle build bake through bake, bake-files and bake-targets
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 17:18:08 +02:00
CrazyMax b07bd1f9df Fix ci workflow
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 07:08:46 +02:00
CrazyMax 01bd5c1fa9 Add allow input
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 07:07:06 +02:00
CrazyMax 82c243c14d Add buildkitd-flags for setup-buildx
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 06:48:42 +02:00
CrazyMax 78a1e0d9a3 Remove builder v1 support
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 05:53:50 +02:00
CrazyMax 807389ab0d Increase tests timeout
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 04:27:36 +02:00
CrazyMax 6aa6546aaa Fix dotenv
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 04:20:50 +02:00
CrazyMax 585c2ae3b7 Spelling
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 04:20:04 +02:00
CrazyMax e9cb922263 Fix and cleanup of v2 setup actions
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 04:14:43 +02:00
CrazyMax 25daa691dd Typo
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 03:21:48 +02:00
CrazyMax f7cac3b071 Refactor Docker config
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 02:37:47 +02:00
CrazyMax ac03ceb5e6 Check if buildx installed (builder alias)
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 02:30:03 +02:00
CrazyMax 6b0b71d882 Disable buildx push for now
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 01:58:05 +02:00
CrazyMax 1af8829102 Fix buildx condition
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 01:53:55 +02:00
CrazyMax 23410eee4e Push to local registry
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 01:52:29 +02:00
CrazyMax 52102ad62f Remove runner info step
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 01:51:39 +02:00
CrazyMax 320acb8414 Parse image reference before push
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 01:50:46 +02:00
CrazyMax b15ad02902 No post proc
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 01:25:03 +02:00
CrazyMax ea0c8ed90e Handle push without buildx
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 01:23:25 +02:00
CrazyMax f0ffce7351 Missing context
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 01:06:24 +02:00
CrazyMax ba9a9528cd Remove
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 01:04:36 +02:00
CrazyMax 99bea387ee Build push action v2
Signed-off-by: CrazyMax <[email protected]>
2020-08-16 00:36:41 +02:00
Tõnis Tiigi 3f08c86128 Merge pull request #87 from docker/mono-action
Mono action
2020-08-14 11:03:27 -07:00
CrazyMax 4e201a2f03 Switch working branch
Signed-off-by: CrazyMax <[email protected]>
2020-08-14 20:01:01 +02:00
CrazyMax 33f14d658e Temp branch event trigger for our tests on v2 actions
Signed-off-by: CrazyMax <[email protected]>
2020-08-14 19:55:34 +02:00
CrazyMax ee3946b77e Display available platforms
Signed-off-by: CrazyMax <[email protected]>
2020-08-14 19:49:19 +02:00
CrazyMax 46bf3297bf Update generated content
Signed-off-by: CrazyMax <[email protected]>
2020-08-13 10:43:24 +02:00
CrazyMax 8f0f662386 Rename buildx-version input to version
Signed-off-by: CrazyMax <[email protected]>
2020-08-13 10:42:57 +02:00
CrazyMax c3b8f61f90 Improve stateHelper
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 23:10:28 +02:00
CrazyMax e53a3da260 Update generated content
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 22:58:01 +02:00
CrazyMax 26b3a3b0cd Small refactor
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 22:56:20 +02:00
CrazyMax ec2628bb21 Update README
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 21:34:30 +02:00
CrazyMax 0cc5e42c7a Add name output to identify builder instance name
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 20:27:50 +02:00
CrazyMax b72149bbe7 Update workflow
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 16:15:50 +02:00
CrazyMax 1ef57147e1 Update workflow
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 16:00:25 +02:00
CrazyMax 5bb3f5433b Check if buildx available on runner
Use default buildx on runner

Signed-off-by: CrazyMax <[email protected]>
2020-08-12 15:58:09 +02:00
CrazyMax 15c6a86f2d Add 'use' input
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 15:10:05 +02:00
CrazyMax d0f7649930 Fix workflow
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 14:10:08 +02:00
CrazyMax 5cec6ce786 Add driver and driver-opt inputs for setup-buildx
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 14:07:04 +02:00
CrazyMax 4bde7b156d Dump context
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 02:13:00 +02:00
CrazyMax 8e7bb4ab28 Silent command
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 02:03:20 +02:00
CrazyMax 1886d9322f Fix platforms extraction
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 02:02:19 +02:00
CrazyMax 4522dd93f5 Dump context composite
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 01:53:29 +02:00
CrazyMax 2ad38f5d19 Generated content
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 01:49:41 +02:00
CrazyMax 2f906a9cb7 Output available platforms for setup-qemu
Signed-off-by: CrazyMax <[email protected]>
2020-08-12 01:48:35 +02:00
CrazyMax 674ff6ada6 Trigger on master branch
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 22:55:56 +02:00
CrazyMax 3f39bb96b5 Dump contexts for testing purpose
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 22:24:25 +02:00
CrazyMax a1eb1729d4 Update READMEs
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 21:58:01 +02:00
CrazyMax 66ba91a185 Use master tag
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 21:56:01 +02:00
CrazyMax e3626b5cb1 Fix workflows
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 21:53:26 +02:00
CrazyMax b943609390 Switch to tonistiigi/binfmt
Add platforms input to choose what platforms to install

Signed-off-by: CrazyMax <[email protected]>
2020-08-11 21:49:46 +02:00
CrazyMax 7e439a0132 Move editorconfig
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 21:05:57 +02:00
CrazyMax 8d34fc9a8e Update README
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 14:34:01 +02:00
CrazyMax 5290010a6f Add install input to set buildx as default builder (#71)
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 14:34:00 +02:00
CrazyMax 925fee3dc9 Will be named docker/actions
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 14:34:00 +02:00
CrazyMax f443d57e89 Example with QEMU
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 14:33:59 +02:00
CrazyMax 87d5297de8 Add qemu + buildx job
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 14:33:59 +02:00
CrazyMax 64d53ac2cf Add setup-qemu action (#71)
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 14:33:58 +02:00
CrazyMax 36c90bc3ab Fix setup-buildx test workflow
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 14:33:58 +02:00
CrazyMax 6df1822dc3 Add setup-buildx action (#71)
Signed-off-by: CrazyMax <[email protected]>
2020-08-11 14:33:49 +02:00
52 changed files with 24113 additions and 291 deletions
+2
View File
@@ -0,0 +1,2 @@
/coverage
/node_modules
+15
View File
@@ -0,0 +1,15 @@
# This file is for unifying the coding style for different editors and IDEs.
# More information at http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
+2
View File
@@ -0,0 +1,2 @@
/dist/** linguist-generated=true
/lib/** linguist-generated=true
+1
View File
@@ -0,0 +1 @@
* @crazy-max
+31
View File
@@ -0,0 +1,31 @@
## Contributing
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://docs.github.com/en/github/site-policy/github-terms-of-service#6-contributions-under-repository-license)
to the public under the [project's open source license](LICENSE).
## Submitting a pull request
1. [Fork](https://github.com/docker/build-push-action/fork) and clone the repository
2. Configure and install the dependencies: `yarn install`
3. Create a new branch: `git checkout -b my-branch-name`
4. Make your changes
5. Make sure the tests pass: `docker buildx bake test`
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`
8. Push to your fork and [submit a pull request](https://github.com/docker/build-push-action/compare)
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:
- 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.
- 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**.
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
## Resources
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
- [Using Pull Requests](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
- [GitHub Help](https://docs.github.com/en)
+37
View File
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
---
### Troubleshooting
Before sumbitting a bug report please read the [Troubleshooting doc](https://github.com/docker/build-push-action/blob/master/TROUBLESHOOTING.md).
### Behaviour
#### Steps to reproduce this issue
1.
2.
3.
#### Expected behaviour
> Tell us what should happen
#### Actual behaviour
> Tell us what happens instead
### Configuration
* Repository URL (if public):
* Build URL (if public):
```yml
# paste your YAML workflow file here and remove sensitive data
```
### Logs
> 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.
+31
View File
@@ -0,0 +1,31 @@
# Support [![](https://isitmaintained.com/badge/resolution/docker/build-push-action.svg)](https://isitmaintained.com/project/docker/build-push-action)
First, [be a good guy](https://github.com/kossnocorp/etiquette/blob/master/README.md).
## Reporting an issue
Please do a search in [open issues](https://github.com/docker/build-push-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.
:+1: - upvote
:-1: - downvote
If you cannot find an existing issue that describes your bug or feature, submit an issue using the guidelines below.
## Writing good bug reports and feature requests
File a single issue per problem and feature request.
* Do not enumerate multiple bugs or feature requests in the same issue.
* Do not add your issue as a comment to an existing issue unless it's for the identical input. Many issues look similar, but have different causes.
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/docker/build-push-action/issues/new/choose)!
## Closure policy
* Issues that don't have the information requested above (when applicable) will be closed immediately and the poster directed to the support guidelines.
* Issues that go a week without a response from original poster are subject to closure at our discretion.
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

+18
View File
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- ":game_die: dependencies"
- ":robot: bot"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-type: "production"
labels:
- ":game_die: dependencies"
- ":robot: bot"
File diff suppressed because it is too large Load Diff
+105
View File
@@ -0,0 +1,105 @@
name: e2e
on:
workflow_dispatch:
schedule:
- cron: '0 10 * * *' # everyday at 10am
push:
branches:
- master
tags:
- v*
jobs:
docker:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
-
registry: ''
slug: ghactionstest/ghactionstest
username_secret: DOCKERHUB_USERNAME
password_secret: DOCKERHUB_TOKEN
-
registry: ghcr.io
slug: ghcr.io/docker-ghactiontest/test
username_secret: GHCR_USERNAME
password_secret: GHCR_PAT
-
registry: registry.gitlab.com
slug: registry.gitlab.com/test1716/test
username_secret: GITLAB_USERNAME
password_secret: GITLAB_TOKEN
-
registry: 175142243308.dkr.ecr.us-east-2.amazonaws.com
slug: 175142243308.dkr.ecr.us-east-2.amazonaws.com/sandbox/test-docker-action
username_secret: AWS_ACCESS_KEY_ID
password_secret: AWS_SECRET_ACCESS_KEY
-
registry: public.ecr.aws
slug: public.ecr.aws/q3b5f1u4/test-docker-action
username_secret: AWS_ACCESS_KEY_ID
password_secret: AWS_SECRET_ACCESS_KEY
-
registry: us-east4-docker.pkg.dev
slug: us-east4-docker.pkg.dev/sandbox-298914/docker-official-github-actions/test-docker-action
username_secret: GAR_USERNAME
password_secret: GAR_JSON_KEY
-
registry: gcr.io
slug: gcr.io/sandbox-298914/test-docker-action
username_secret: GCR_USERNAME
password_secret: GCR_JSON_KEY
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: ${{ matrix.slug }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ${{ matrix.registry }}
username: ${{ secrets[matrix.username_secret] }}
password: ${{ secrets[matrix.password_secret] }}
-
name: Build and push
uses: ./
with:
context: ./test
file: ./test/multi.Dockerfile
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ matrix.slug }}:master
cache-to: type=inline
-
name: Inspect image
if: github.event_name != 'pull_request'
run: |
docker pull ${{ matrix.slug }}:${{ steps.meta.outputs.version }}
docker image inspect ${{ matrix.slug }}:${{ steps.meta.outputs.version }}
-
name: Check manifest
if: github.event_name != 'pull_request'
run: |
docker buildx imagetools inspect ${{ matrix.slug }}:${{ steps.meta.outputs.version }}
-
name: Dump context
if: always()
uses: crazy-max/ghaction-dump-context@v1
+78
View File
@@ -0,0 +1,78 @@
# This workflow is provided just as an usage example and not for repo testing/verification
name: example
on:
schedule:
- cron: '0 10 * * 0' # everyday sunday at 10am
push:
branches:
- '**'
tags:
- 'v*.*.*'
pull_request:
env:
DOCKER_IMAGE: localhost:5000/name/app
jobs:
docker:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: ${{ env.DOCKER_IMAGE }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host
-
name: Build and export to Docker client
uses: ./
with:
context: ./test
file: ./test/Dockerfile
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-
name: Build and push to local registry
uses: ./
with:
context: ./test
file: ./test/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-
name: Inspect image
run: |
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
-
name: Check manifest
if: github.event_name != 'pull_request'
run: |
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
-
name: Dump context
if: always()
uses: crazy-max/ghaction-dump-context@v1
-37
View File
@@ -1,37 +0,0 @@
name: CI
on:
push:
branches:
- master
tags:
- '*'
pull_request:
jobs:
build:
name: build
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run local registry
run: docker run -d -p 5000:5000 registry:2
- name: Build and push image
uses: ./
env:
DOCKER_BUILDKIT: 1
with:
registry: localhost:5000
repository: temp/workflow
tags: foo
- name: Remove local image
run: docker image rm localhost:5000/temp/workflow:foo
- name: Run image from registry
run: docker run localhost:5000/temp/workflow:foo
+32
View File
@@ -0,0 +1,32 @@
name: test
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
jobs:
test:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Validate
uses: docker/bake-action@v1
with:
targets: validate
-
name: Test
uses: docker/bake-action@v1
with:
targets: test
-
name: Upload coverage
uses: codecov/codecov-action@v1
with:
file: ./coverage/clover.xml
+38
View File
@@ -0,0 +1,38 @@
name: virtual-env
on:
workflow_dispatch:
schedule:
- cron: '0 10 * * *' # everyday at 10am
jobs:
os:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-20.04
- ubuntu-18.04
- ubuntu-16.04
steps:
-
name: List install packages
run: apt list --installed
-
name: Docker info
run: docker info
-
name: Docker version
run: docker version
-
name: buildx version
run: docker buildx version
-
name: containerd version
run: containerd --version
-
name: Dump context
if: always()
uses: crazy-max/ghaction-dump-context@v1
+95
View File
@@ -0,0 +1,95 @@
node_modules
lib
# Jetbrains
/.idea
/*.iml
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
+11
View File
@@ -0,0 +1,11 @@
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid",
"parser": "typescript"
}
-3
View File
@@ -1,3 +0,0 @@
FROM alpine:3
ENTRYPOINT ["echo", "docker github actions"]
+207 -201
View File
@@ -1,243 +1,249 @@
# build-push-action
[![GitHub release](https://img.shields.io/github/release/docker/build-push-action.svg?style=flat-square)](https://github.com/docker/build-push-action/releases/latest)
[![GitHub marketplace](https://img.shields.io/badge/marketplace-build--and--push--docker--images-blue?logo=github&style=flat-square)](https://github.com/marketplace/actions/build-and-push-docker-images)
[![CI workflow](https://img.shields.io/github/workflow/status/docker/build-push-action/ci?label=ci&logo=github&style=flat-square)](https://github.com/docker/build-push-action/actions?workflow=ci)
[![Test workflow](https://img.shields.io/github/workflow/status/docker/build-push-action/test?label=test&logo=github&style=flat-square)](https://github.com/docker/build-push-action/actions?workflow=test)
[![Codecov](https://img.shields.io/codecov/c/github/docker/build-push-action?logo=codecov&style=flat-square)](https://codecov.io/gh/docker/build-push-action)
Builds and pushes Docker images and will log in to a Docker registry if required.
## Upgrade from v1
Suggestions and issues can be posted on the repositories [issues page](https://github.com/docker/build-push-action/issues).
`v2` of this action includes significant updates and now uses Docker [Buildx](https://github.com/docker/buildx). It's
also rewritten as a [typescript-action](https://github.com/actions/typescript-action/) to be as close as possible
of the [GitHub Runner](https://github.com/actions/virtual-environments) during its execution.
[Inputs](#Inputs)
* [repository](#repository)
* [username](#username)
* [password](#password)
* [registry](#registry)
* [tags](#tags)
* [tag_with_ref](#tag_with_ref)
* [tag_with_sha](#tag_with_sha)
* [path](#path)
* [dockerfile](#dockerfile)
* [target](#target)
* [always_pull](#always_pull)
* [build_args](#build_args)
* [cache_froms](#cache_froms)
* [labels](#labels)
* [add_git_labels](#add_git_labels)
* [push](#push)
[Upgrade notes](UPGRADE.md) with many [usage examples](#advanced-usage) have been added to handle most use cases but
`v1` is still available through [`releases/v1` branch](https://github.com/docker/build-push-action/tree/releases/v1).
[Example usage](#Example-usage)
## About
## Inputs
GitHub Action to build and push Docker images with [Buildx](https://github.com/docker/buildx) with full support of the
features provided by [Moby BuildKit](https://github.com/moby/buildkit) builder toolkit. This includes multi-platform
build, secrets, remote cache, etc. and different builder deployment/namespacing options.
### `repository`
![Screenshot](.github/build-push-action.png)
**Required** Docker repository to tag the image with.
___
### `username`
* [Usage](#usage)
* [Git context](#git-context)
* [Path context](#path-context)
* [Advanced usage](#advanced-usage)
* [Multi-platform image](docs/advanced/multi-platform.md)
* [Secrets](docs/advanced/secrets.md)
* [Isolated builders](docs/advanced/isolated-builders.md)
* [Push to multi-registries](docs/advanced/push-multi-registries.md)
* [Cache](docs/advanced/cache.md)
* [Registry cache](docs/advanced/cache.md#registry-cache)
* [GitHub cache](docs/advanced/cache.md#github-cache)
* [Local registry](docs/advanced/local-registry.md)
* [Export image to Docker](docs/advanced/export-docker.md)
* [Handle tags and labels](docs/advanced/tags-labels.md)
* [Update DockerHub repo description](docs/advanced/dockerhub-desc.md)
* [Customizing](#customizing)
* [inputs](#inputs)
* [outputs](#outputs)
* [Troubleshooting](#troubleshooting)
* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot)
* [Limitation](#limitation)
Username used to log in to a Docker registry. If not set then no login will occur.
## Usage
### `password`
By default, this action uses the [Git context](#git-context) so you don't need to use the
[`actions/checkout`](https://github.com/actions/checkout/) action to checkout the repository because this will be
done directly by buildkit. The git reference will be based on the [event that triggered your workflow](https://docs.github.com/en/actions/reference/events-that-trigger-workflows)
and will result in the following context: `https://github.com/<owner>/<repo>.git#<ref>`.
Password or personal access token used to log in to a Docker registry. If not set then no login will occur.
Be careful because **any file mutation in the steps that precede the build step will be ignored** since
the context is based on the git reference. However, you can use the [Path context](#path-context) using the
[`context` input](#inputs) alongside the [`actions/checkout`](https://github.com/actions/checkout/) action to remove
this restriction.
### `registry`
In the examples below we are using 3 other actions:
Server address of Docker registry. If not set then will default to Docker Hub.
* [`setup-buildx`](https://github.com/docker/setup-buildx-action) action will create and boot a builder using by
default the `docker-container` [builder driver](https://github.com/docker/buildx/blob/master/docs/reference/buildx_create.md#driver).
This is **not required but recommended** using it to be able to build multi-platform images, export cache, etc.
* [`setup-qemu`](https://github.com/docker/setup-qemu-action) action can be useful if you want
to add emulation support with QEMU to be able to build against more platforms.
* [`login`](https://github.com/docker/login-action) action will take care to log in against a Docker registry.
### `tags`
Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags.
Example:
### Git context
```yaml
tags: tag1,tag2
name: ci
on:
push:
branches:
- 'master'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: user/app:latest
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
```
### `tag_with_ref`
Boolean value. Defaults to `false`.
Automatically tags the built image with the git reference. The format of the tag depends on the type of git reference with all forward slashes replaced with `-`.
For pushes to a branch the reference will be `refs/heads/{branch-name}` and the tag will be `{branch-name}`. If `{branch-name}` is master then the tag will be `latest`.
For pull requests the reference will be `refs/pull/{pull-request}` and the tag will be `pr-{pull-request}`.
For git tags the reference will be `refs/tags/{git-tag}` and the tag will be `{git-tag}`.
Examples:
|Git Reference|Image tag|
|---|---|
|`refs/heads/master`|`latest`|
|`refs/heads/mybranch`|`mybranch`|
|`refs/heads/my/branch`|`my-branch`|
|`refs/pull/2/merge`|`pr-2-merge`|
|`refs/tags/v1.0.0`|`v1.0.0`|
### `tag_with_sha`
Boolean value. Defaults to `false`.
Automatically tags the built image with the git short SHA prefixed with `sha-`.
Example:
|Git SHA|Image tag|
|---|---|
|`676cae2f85471aeff6776463c72881ebd902dcf9`|`sha-676cae2`|
### `path`
Path to the build context. Defaults to `.`
### `dockerfile`
Path to the Dockerfile. Defaults to `{path}/Dockerfile`
Note when set this path is **not** relative to the `path` input but is instead relative to the current working directory.
### `target`
Sets the target stage to build.
### `always_pull`
Boolean value. Defaults to `false`.
Always attempt to pull a newer version of the image.
### `build_args`
Comma-delimited list of build-time variables.
Example:
Building from the current repository automatically uses the [GitHub Token](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)
so it does not need to be passed. If you want to authenticate against another private repository, you have to use
a [secret](docs/advanced/secrets.md) named `GIT_AUTH_TOKEN` to be able to authenticate against it with buildx:
```yaml
build_args: arg1=value1,arg2=value2
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: user/app:latest
secrets: |
GIT_AUTH_TOKEN=${{ secrets.MYTOKEN }}
```
### `cache_froms`
> :warning: Subdir for Git context is not yet supported ([moby/buildkit#1684](https://github.com/moby/buildkit/issues/1684))
> but you can use the [path context](#path-context) in the meantime. More info on [Docker docs website](https://docs.docker.com/engine/reference/commandline/build/#git-repositories).
Comma-delimited list of images to consider as cache sources.
Example:
```yaml
cache_froms: myorg/baseimage:latest
```
### `labels`
Comma-delimited list of labels to add to the built image.
Example:
### Path context
```yaml
labels: label_name_1=label_value_1,label_name_2=label_value_2
name: ci
on:
push:
branches:
- 'master'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: user/app:latest
```
### `add_git_labels`
## Advanced usage
Boolean value. Defaults to `false`.
* [Multi-platform image](docs/advanced/multi-platform.md)
* [Secrets](docs/advanced/secrets.md)
* [Isolated builders](docs/advanced/isolated-builders.md)
* [Push to multi-registries](docs/advanced/push-multi-registries.md)
* [Cache](docs/advanced/cache.md)
* [Registry cache](docs/advanced/cache.md#registry-cache)
* [GitHub cache](docs/advanced/cache.md#github-cache)
* [Local registry](docs/advanced/local-registry.md)
* [Export image to Docker](docs/advanced/export-docker.md)
* [Handle tags and labels](docs/advanced/tags-labels.md)
* [Update DockerHub repo description](docs/advanced/dockerhub-desc.md)
Adds labels with git repository information to the built image based on the standards set out in https://github.com/opencontainers/image-spec/blob/master/annotations.md.
## Customizing
The labels are:
### inputs
|Label key|Example value|Description|
|---|---|---|
|`org.opencontainers.image.created`|`2020-03-06T23:00:00Z`|Date and time on which the image was built (string, date-time as defined by RFC 3339).|
|`org.opencontainers.image.source`|`https://github.com/myorg/myrepository`|URL to the GitHub repository.|
|`org.opencontainers.image.revision`|`676cae2f85471aeff6776463c72881ebd902dcf9`|The full git SHA of this commit.|
Following inputs can be used as `step.with` keys
> `List` type is a newline-delimited string
> ```yaml
> cache-from: |
> user/app:cache
> type=local,src=path/to/dir
> ```
### `push`
> `CSV` type is a comma-delimited string
> ```yaml
> tags: name/app:latest,name/app:1.0.0
> ```
Boolean value. Defaults to `true`.
| Name | Type | Description |
|---------------------|----------|------------------------------------|
| `allow` | List/CSV | List of [extra privileged entitlement](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#allow) (eg. `network.host,security.insecure`) |
| `builder` | String | Builder instance (see [setup-buildx](https://github.com/docker/setup-buildx-action) action) |
| `build-args` | List | List of build-time variables |
| `cache-from` | List | List of [external cache sources](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#cache-from) (eg. `type=local,src=path/to/dir`) |
| `cache-to` | List | List of [cache export destinations](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#cache-to) (eg. `type=local,dest=path/to/dir`) |
| `context` | String | Build's context is the set of files located in the specified [`PATH` or `URL`](https://docs.docker.com/engine/reference/commandline/build/) (default [Git context](#git-context)) |
| `file` | String | Path to the Dockerfile. (default `{context}/Dockerfile`) |
| `labels` | List | List of metadata for an image |
| `load` | Bool | [Load](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#load) is a shorthand for `--output=type=docker` (default `false`) |
| `network` | String | Set the networking mode for the `RUN` instructions during build |
| `no-cache` | Bool | Do not use cache when building the image (default `false`) |
| `outputs` | List | List of [output destinations](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#output) (format: `type=local,dest=path`) |
| `platforms` | List/CSV | List of [target platforms](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#platform) for build |
| `pull` | Bool | Always attempt to pull a newer version of the image (default `false`) |
| `push` | Bool | [Push](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#push) is a shorthand for `--output=type=registry` (default `false`) |
| `secrets` | List | List of secrets to expose to the build (eg. `key=string`, `GIT_AUTH_TOKEN=mytoken`) |
| `secret-files` | List | List of secret files to expose to the build (eg. `key=filename`, `MY_SECRET=./secret.txt`) |
| `ssh` | List | List of SSH agent socket or keys to expose to the build |
| `tags` | List/CSV | List of tags |
| `target` | String | Sets the target stage to build |
Whether to push the built image.
### outputs
## Example usage
Following outputs are available
The following will build the root Dockerfile, tag the image as `myorg/myrepository:latest`, log in to Docker Hub using GitHub secrets, and push the image to the Docker Hub repository `myorg/myrepository`:
| Name | Type | Description |
|---------------|---------|---------------------------------------|
| `digest` | String | Image content-addressable identifier also called a digest |
## Troubleshooting
See [TROUBLESHOOTING.md](TROUBLESHOOTING.md)
## Keep up-to-date with GitHub Dependabot
Since [Dependabot](https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot)
has [native GitHub Actions support](https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#package-ecosystem),
to enable it on your GitHub repo all you need to do is add the `.github/dependabot.yml` file:
```yaml
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: myorg/myrepository
tags: latest
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
```
The following will build the root Dockerfile, tag the image with the git reference and SHA as described above, log in to Docker Hub using GitHub secrets, and push the image to the Docker Hub repository `myorg/myrepository`:
## Limitation
```yaml
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: myorg/myrepository
tag_with_ref: true
tag_with_sha: true
```
The following will only push the image when the event that kicked off the workflow was a push of a git tag:
```yaml
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: myorg/myrepository
tag_with_ref: true
push: ${{ startsWith(github.ref, 'refs/tags/') }}
```
The following builds the `mytarget` stage and pushes that:
```yaml
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: myorg/myrepository
tag_with_ref: true
target: mytarget
```
The following will build the root Dockerfile, tag the image as `myorg/myrepository:latest`, log in to Google Container Registry using GitHub secrets (where `DOCKER_PASSWORD` is a [JSON key](https://cloud.google.com/container-registry/docs/advanced-authentication#json-key)), and push the image to the GCR repository `myorg/myrepository`:
```yaml
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: _json_key
password: ${{ secrets.DOCKER_PASSWORD }}
registry: gcr.io
repository: myorg/myrepository
tags: latest
```
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).
+73
View File
@@ -0,0 +1,73 @@
# Troubleshooting
* [Cannot push to a registry](#cannot-push-to-a-registry)
## Cannot push to a registry
While pushing to a registry, you may encounter these kinds of issues:
* `failed commit on ref "layer-sha256:...": invalid content digest in response: invalid checksum digest format`
* `failed commit on ref "layer-sha256:...": no response`
* `failed commit on ref "manifest-sha256:...": unexpected status: 400 Bad Request`
* `failed commit on ref "manifest-sha256:...": unexpected status: 401 Unauthorized`
* `unexpected response: 401 Unauthorized`
These issues are not directly related to this action but are rather linked to [buildx](https://github.com/docker/buildx),
[buildkit](https://github.com/moby/buildkit), [containerd](https://github.com/containerd/containerd) or the registry
on which you're pushing your image. The quality of error message depends on the registry and are usually not very informative.
To help you solve this, you should first enable debugging in the
[setup-buildx action step](https://github.com/docker/setup-buildx-action):
```yaml
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
buildkitd-flags: --debug
```
Next you can test pushing with [containerd action](https://github.com/crazy-max/ghaction-setup-containerd) using the
following workflow. If it works then open an issue on [buildkit](https://github.com/moby/buildkit) repository.
```yaml
name: containerd
on:
push:
jobs:
containerd:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
buildkitd-flags: --debug
-
name: Set up containerd
uses: crazy-max/ghaction-setup-containerd@v1
-
name: Build Docker image
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
tags: docker.io/user/app:latest
outputs: type=oci,dest=/tmp/image.tar
-
name: Import image in containerd
run: |
sudo ctr i import --base-name docker.io/user/app --digests --all-platforms /tmp/image.tar
-
name: Push image with containerd
run: |
sudo ctr --debug i push --user "${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }}" docker.io/user/app:latest
```
+147
View File
@@ -0,0 +1,147 @@
# Upgrade notes
## v1 to v2
* Input `path` is now called `context` for consistency with other Docker build tools
* `path` defaults to current git repository so checkout action is not required in a workflow
* Rename `dockerfile` input to `file` for consistency with other Docker build tools
* Rename `always_pull` input to `pull` for consistency with other Docker build tools
* Add `builder` input to be able to choose a builder instance through our [setup-buildx action](https://github.com/docker/setup-buildx-action)
* Add `platforms` input to support multi-platform builds
* Add `allow` input
* Add `load` input
* Add `outputs` input
* Add `cache-from` input (`cache_froms` removed)
* Add `cache-to` input
* Rename `build_args` input to `build-args` for consistency with other Docker build tools
* Add `secrets` input
* Review `tags` input
* Remove `repository` input. See [Simple workflow](#simple-workflow) for migration
* Remove `username`, `password` and `registry` inputs. Login support moved to [docker/login-action](https://github.com/docker/login-action) repo
* Remove `tag_with_sha`, `tag_with_ref`, `add_git_labels` inputs. See [Tags with ref and Git labels](#tags-with-ref-and-git-labels) for migration
* Handle Git context
* Add `digest` output
### Simple workflow
```yaml
# v1
steps:
-
name: Checkout code
uses: actions/checkout@v2
-
name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: myorg/myrepository
always_pull: true
build_args: arg1=value1,arg2=value2
cache_froms: myorg/myrepository:latest
tags: latest
```
```yaml
# v2
steps:
-
name: Checkout code
uses: actions/checkout@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
pull: true
push: true
build-args: |
arg1=value1
arg2=value2
cache-from: type=registry,ref=myorg/myrepository:latest
cache-to: type=inline
tags: myorg/myrepository:latest
```
### Tags with ref and Git labels
```yaml
# v1
steps:
-
name: Checkout code
uses: actions/checkout@v2
-
name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: myorg/myrepository
push: ${{ github.event_name != 'pull_request' }}
tag_with_ref: true
tag_with_sha: true
add_git_labels: true
```
```yaml
# v2
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Prepare
id: prep
run: |
DOCKER_IMAGE=myorg/myrepository
VERSION=edge
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
elif [[ $GITHUB_REF == refs/pull/* ]]; then
VERSION=pr-${{ github.event.number }}
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
if [ "${{ github.event_name }}" = "push" ]; then
TAGS="$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}"
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}
labels: |
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
```
> You can also use the [Docker meta action to handle tags and labels](docs/advanced/tags-labels.md) based on GitHub
> actions events and Git metadata.
+154
View File
@@ -0,0 +1,154 @@
import * as fs from 'fs';
import * as path from 'path';
import * as semver from 'semver';
import * as buildx from '../src/buildx';
import * as context from '../src/context';
import * as docker from '../src/docker';
const tmpNameSync = path.join('/tmp/.docker-build-push-jest', '.tmpname-jest').split(path.sep).join(path.posix.sep);
const digest = 'sha256:bfb45ab72e46908183546477a08f8867fc40cebadd00af54b071b097aed127a9';
jest.spyOn(context, 'tmpDir').mockImplementation((): string => {
const tmpDir = path.join('/tmp/.docker-build-push-jest').split(path.sep).join(path.posix.sep);
if (!fs.existsSync(tmpDir)) {
fs.mkdirSync(tmpDir, {recursive: true});
}
return tmpDir;
});
jest.spyOn(context, 'tmpNameSync').mockImplementation((): string => {
return tmpNameSync;
});
describe('getImageID', () => {
it('matches', async () => {
const imageIDFile = await buildx.getImageIDFile();
console.log(`imageIDFile: ${imageIDFile}`);
await fs.writeFileSync(imageIDFile, digest);
const imageID = await buildx.getImageID();
console.log(`imageID: ${imageID}`);
expect(imageID).toEqual(digest);
});
});
describe('isLocalOrTarExporter', () => {
// prettier-ignore
test.each([
[
[
'type=registry,ref=user/app',
],
false
],
[
[
'type=docker',
],
false
],
[
[
'type=local,dest=./release-out'
],
true
],
[
[
'type=tar,dest=/tmp/image.tar'
],
true
],
[
[
'type=docker',
'type=tar,dest=/tmp/image.tar'
],
true
],
[
[
'"type=tar","dest=/tmp/image.tar"'
],
true
],
[
[
'" type= local" , dest=./release-out'
],
true
],
[
[
'.'
],
true
],
])(
'given %p returns %p',
async (outputs: Array<string>, expected: boolean) => {
expect(buildx.isLocalOrTarExporter(outputs)).toEqual(expected);
}
);
});
describe('getVersion', () => {
async function isDaemonRunning() {
return await docker.isDaemonRunning();
}
(isDaemonRunning() ? it : it.skip)(
'valid',
async () => {
const version = await buildx.getVersion();
console.log(`version: ${version}`);
expect(semver.valid(version)).not.toBeNull();
},
100000
);
});
describe('parseVersion', () => {
test.each([
['github.com/docker/buildx 0.4.1+azure bda4882a65349ca359216b135896bddc1d92461c', '0.4.1'],
['github.com/docker/buildx v0.4.1 bda4882a65349ca359216b135896bddc1d92461c', '0.4.1'],
['github.com/docker/buildx v0.4.2 fb7b670b764764dc4716df3eba07ffdae4cc47b2', '0.4.2']
])('given %p', async (stdout, expected) => {
expect(await buildx.parseVersion(stdout)).toEqual(expected);
});
});
describe('getSecret', () => {
test.each([
['A_SECRET=abcdef0123456789', false, 'A_SECRET', 'abcdef0123456789', false],
['GIT_AUTH_TOKEN=abcdefghijklmno=0123456789', false, 'GIT_AUTH_TOKEN', 'abcdefghijklmno=0123456789', false],
['MY_KEY=c3RyaW5nLXdpdGgtZXF1YWxzCg==', false, 'MY_KEY', 'c3RyaW5nLXdpdGgtZXF1YWxzCg==', false],
['aaaaaaaa', false, '', '', true],
['aaaaaaaa=', false, '', '', true],
['=bbbbbbb', false, '', '', true],
[
`foo=${path.join(__dirname, 'fixtures', 'secret.txt').split(path.sep).join(path.posix.sep)}`,
true,
'foo',
'bar',
false
],
[`notfound=secret`, true, '', '', true]
])('given %p key and %p secret', async (kvp, file, exKey, exValue, invalid) => {
try {
let secret: string;
if (file) {
secret = await buildx.getSecretFile(kvp);
} else {
secret = await buildx.getSecretString(kvp);
}
expect(true).toBe(!invalid);
console.log(`secret: ${secret}`);
expect(secret).toEqual(`id=${exKey},src=${tmpNameSync}`);
const secretValue = await fs.readFileSync(tmpNameSync, 'utf-8');
console.log(`secretValue: ${secretValue}`);
expect(secretValue).toEqual(exValue);
} catch (err) {
expect(true).toBe(invalid);
}
});
});
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
bar
+69 -50
View File
@@ -1,67 +1,86 @@
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
name: Build and push Docker images
description: Builds and pushes Docker images and will log in to a Docker registry if required
author: Docker
description: Build and push Docker images with Buildx
author: docker
branding:
icon: 'anchor'
color: 'blue'
runs:
using: docker
image: docker://docker/github-actions:v1
args:
- build-push
inputs:
username:
description: Username used to log in to a Docker registry. If not set then no login will occur
allow:
description: "List of extra privileged entitlement (eg. network.host,security.insecure)"
required: false
password:
description: Password or personal access token used to log in to a Docker registry. If not set then no login will occur
build-args:
description: "List of build-time variables"
required: false
registry:
description: Server address of Docker registry. If not set then will default to Docker Hub
builder:
description: "Builder instance"
required: false
repository:
deprecationMessage: 'v2 is now available through docker/build-push-action@v2'
description: Docker repository to tag the image with
required: true
tags:
description: Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags
cache-from:
description: "List of external cache sources for buildx (eg. user/app:cache, type=local,src=path/to/dir)"
required: false
tag_with_ref:
description: Automatically tags the built image with the git reference as per the readme
cache-to:
description: "List of cache export destinations for buildx (eg. user/app:cache, type=local,dest=path/to/dir)"
required: false
default: false
tag_with_sha:
description: Automatically tags the built image with the git short SHA as per the readme
context:
description: "Build's context is the set of files located in the specified PATH or URL"
required: false
default: false
path:
description: Path to the build context
required: false
default: "."
dockerfile:
description: Path to the Dockerfile (Default is '{path}/Dockerfile')
required: false
target:
description: Sets the target stage to build
required: false
always_pull:
description: Always attempt to pull a newer version of the image
required: false
default: false
build_args:
description: Comma-delimited list of build-time variables
required: false
cache_froms:
description: Comma-delimited list of images to consider as cache sources
file:
description: "Path to the Dockerfile"
required: false
labels:
description: Comma-delimited list of labels to add to the built image
description: "List of metadata for an image"
required: false
add_git_labels:
description: Adds labels with git repository information to the built image
load:
description: "Load is a shorthand for --output=type=docker"
required: false
default: false
default: 'false'
network:
description: "Set the networking mode for the RUN instructions during build"
required: false
no-cache:
description: "Do not use cache when building the image"
required: false
default: 'false'
outputs:
description: "List of output destinations (format: type=local,dest=path)"
required: false
platforms:
description: "List of target platforms for build"
required: false
pull:
description: "Always attempt to pull a newer version of the image"
required: false
default: 'false'
push:
description: Whether to push the image
description: "Push is a shorthand for --output=type=registry"
required: false
default: true
default: 'false'
secrets:
description: "List of secrets to expose to the build (eg. key=string, GIT_AUTH_TOKEN=mytoken)"
required: false
secret-files:
description: "List of secret files to expose to the build (eg. key=filename, MY_SECRET=./secret.txt)"
required: false
ssh:
description: "List of SSH agent socket or keys to expose to the build"
required: false
tags:
description: "List of tags"
required: false
target:
description: "Sets the target stage to build"
required: false
github-token:
description: "GitHub Token used to authenticate against a repository for Git context"
default: ${{ github.token }}
required: false
outputs:
digest:
description: 'Image content-addressable identifier also called a digest'
runs:
using: 'node12'
main: 'dist/index.js'
post: 'dist/index.js'
Generated Vendored
+16613
View File
File diff suppressed because it is too large Load Diff
+67
View File
@@ -0,0 +1,67 @@
variable "NODE_VERSION" {
default = "12"
}
target "node-version" {
args = {
NODE_VERSION = NODE_VERSION
}
}
group "default" {
targets = ["build"]
}
group "pre-checkin" {
targets = ["vendor-update", "format", "build"]
}
group "validate" {
targets = ["format-validate", "build-validate", "vendor-validate"]
}
target "build" {
inherits = ["node-version"]
dockerfile = "./hack/build.Dockerfile"
target = "build-update"
output = ["."]
}
target "build-validate" {
inherits = ["node-version"]
dockerfile = "./hack/build.Dockerfile"
target = "build-validate"
}
target "format" {
inherits = ["node-version"]
dockerfile = "./hack/build.Dockerfile"
target = "format-update"
output = ["."]
}
target "format-validate" {
inherits = ["node-version"]
dockerfile = "./hack/build.Dockerfile"
target = "format-validate"
}
target "vendor-update" {
inherits = ["node-version"]
dockerfile = "./hack/vendor.Dockerfile"
target = "update"
output = ["."]
}
target "vendor-validate" {
inherits = ["node-version"]
dockerfile = "./hack/vendor.Dockerfile"
target = "validate"
}
target "test" {
inherits = ["node-version"]
dockerfile = "./hack/test.Dockerfile"
target = "test-coverage"
output = ["./coverage"]
}
+107
View File
@@ -0,0 +1,107 @@
# Cache
* [Registry cache](#registry-cache)
* [GitHub cache](#github-cache)
> More info about buildx cache: https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#cache-from
## Registry cache
You can import/export cache from a cache manifest or (special) image configuration on the registry.
```yaml
name: ci
on:
push:
branches:
- 'master'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: user/app:latest
cache-from: type=registry,ref=user/app:latest
cache-to: type=inline
```
## GitHub cache
> :warning: At the moment caches are copied over the existing cache so it [keeps growing](https://github.com/docker/build-push-action/issues/252).
> The `Move cache` step is used as a temporary fix (see https://github.com/moby/buildkit/issues/1896).
> :rocket: There is a new cache backend using GitHub cache being developed that will lighten your workflow.
> More info: https://github.com/docker/buildx/pull/535
You can leverage [GitHub cache](https://docs.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows)
using [actions/cache](https://github.com/actions/cache) with this action:
```yaml
name: ci
on:
push:
branches:
- 'master'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: user/app:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
-
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
```
+48
View File
@@ -0,0 +1,48 @@
# Update DockerHub repo description
You can update the [DockerHub repository description](https://docs.docker.com/docker-hub/repos/) using
a third party action called [DockerHub Description](https://github.com/peter-evans/dockerhub-description)
with this action:
```yaml
name: ci
on:
push:
branches:
- 'master'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: user/app:latest
-
name: Update repo description
uses: peter-evans/dockerhub-description@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: user/app
```
+35
View File
@@ -0,0 +1,35 @@
# Export image to Docker
You may want your build result to be available in the Docker client through `docker images` to be able to use it
in another step of your workflow:
```yaml
name: ci
on:
push:
branches:
- 'master'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build
uses: docker/build-push-action@v2
with:
context: .
load: true
tags: myimage:latest
-
name: Inspect
run: |
docker image inspect myimage:latest
```

Some files were not shown because too many files have changed in this diff Show More