Skip to content

Commit

Permalink
Remove bake support for now (future release or subaction)
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
CrazyMax committed Aug 17, 2020
1 parent e796490 commit 2962fe9
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 995 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,50 +108,6 @@ jobs:
if: always()
uses: crazy-max/ghaction-dump-context@v1

bake:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- default
- release
steps:
-
name: Run local registry
run: |
docker run -d -p 5000:5000 registry:2
-
name: Checkout
uses: actions/checkout@v2.3.1
-
name: Set up QEMU
uses: ./setup-qemu/ # change to docker/setup-qemu-action@master
with:
platforms: all
-
name: Set up Docker Buildx
id: buildx
uses: ./setup-buildx/ # change to docker/setup-buildx-action@master
with:
driver-opt: network=host
buildkitd-flags: --allow-insecure-entitlement security.insecure
-
name: Build and push
uses: ./
with:
builder: ${{ steps.buildx.outputs.name }}
bake: true
push: false # set to true when https://github.com/docker/buildx/issues/179 is fixed
bake-files: |
./test/config.hcl
bake-targets: |
${{ matrix.target }}
-
name: Dump context
if: always()
uses: crazy-max/ghaction-dump-context@v1

github-cache:
runs-on: ubuntu-latest
steps:
Expand Down
55 changes: 0 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ ___

* [Usage](#usage)
* [Quick start](#quick-start)
* [Bake](#bake)
* [Git context](#git-context)
* [Customizing](#customizing)
* [inputs](#inputs)
Expand Down Expand Up @@ -66,57 +65,6 @@ jobs:
user/app:1.0.0
```
### Bake
[Buildx bake](https://github.com/docker/buildx#buildx-bake-options-target) is also available with this action through
the [`bake` inputs](#inputs):

```yaml
name: ci
on:
pull_request:
branches: master
push:
branches: master
tags:
jobs:
bake:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: crazy-max/ghaction-docker-login@v1 # switch to docker/login-action@v1 when available
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
push: true
bake: true
bake-files: |
./config.hcl
bake-targets: |
default
release
```

### Git context
You can build from Git directly without [`actions/checkout`](https://github.com/actions/checkout/) action,
Expand Down Expand Up @@ -192,9 +140,6 @@ Following inputs can be used as `step.with` keys
| `outputs` | List | | List of [output destinations](https://github.com/docker/buildx#-o---outputpath-typetypekeyvalue) (format: `type=local,dest=path`) |
| `cache-from` | List | | List of [external cache sources](https://github.com/docker/buildx#--cache-fromnametypetypekeyvalue) (eg. `user/app:cache`, `type=local,src=path/to/dir`) |
| `cache-to` | List | | List of [cache export destinations](https://github.com/docker/buildx#--cache-tonametypetypekeyvalue) (eg. `user/app:cache`, `type=local,dest=path/to/dir`) |
| `bake` | Bool | `false` | Use [bake](https://github.com/docker/buildx#buildx-bake-options-target) as the high-level build command |
| `bake-files` | List | | List of [bake definition files](https://github.com/docker/buildx#file-definition) |
| `bake-targets` | List | | List of bake targets |

> List type can be a comma or newline-delimited string
> ```yaml
Expand Down
15 changes: 3 additions & 12 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Docker Build and Push
description: Build and push Docker images
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
name: Docker Build Push
description: Build and push Docker images with Buildx
author: docker
branding:
icon: 'anchor'
Expand Down Expand Up @@ -64,16 +65,6 @@ inputs:
description: "Export all the layers of all intermediate steps in the GitHub cache"
required: false
default: 'false'
bake:
description: "Use bake as the high-level build command"
required: false
default: 'false'
bake-files:
description: "Newline-delimited list of bake definition files"
required: false
bake-targets:
description: "Newline-delimited list of bake targets"
required: false

outputs:
digest:
Expand Down
Loading

0 comments on commit 2962fe9

Please sign in to comment.