Print bake def (#4)

This commit is contained in:
CrazyMax
2020-12-23 20:15:23 +01:00
committed by GitHub
parent 301b8aecd8
commit 7cf3c8378f
4 changed files with 12 additions and 10 deletions

View File

@ -7,10 +7,10 @@ Contributions to this project are [released](https://help.github.com/articles/gi
## Submitting a pull request
1. [Fork](https://github.com/crazy-max/ghaction-docker-buildx-bake/fork) and clone the repository
2. Configure and install the dependencies locally: `yarn install`
3. Make sure the tests pass on your machine: `yarn run test`
4. Create a new branch: `git checkout -b my-branch-name`
5. Make your changes, add tests, and make sure the tests still pass
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/crazy-max/ghaction-docker-buildx-bake/compare)

View File

@ -31,6 +31,7 @@ on:
push:
branches: master
tags:
jobs:
bake:
runs-on: ubuntu-latest
@ -43,7 +44,6 @@ jobs:
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
@ -55,13 +55,11 @@ jobs:
name: Build and push
uses: crazy-max/ghaction-docker-buildx-bake@v1
with:
builder: ${{ steps.buildx.outputs.name }}
push: true
files: |
./config.hcl
targets: |
default
release
push: true
```
## Customizing

4
dist/index.js generated vendored
View File

@ -535,9 +535,11 @@ function run() {
const buildxVersion = yield buildx.getVersion();
core.info(`📣 Buildx version: ${buildxVersion}`);
let inputs = yield context.getInputs();
core.info(`🏃 Starting bake...`);
core.startGroup(`🏃 Starting bake...`);
const args = yield context.getArgs(inputs, buildxVersion);
yield exec.exec('docker', [...args, '--print']);
yield exec.exec('docker', args);
core.endGroup();
}
catch (error) {
core.setFailed(error.message);

View File

@ -21,9 +21,11 @@ async function run(): Promise<void> {
let inputs: context.Inputs = await context.getInputs();
core.info(`🏃 Starting bake...`);
core.startGroup(`🏃 Starting bake...`);
const args: string[] = await context.getArgs(inputs, buildxVersion);
await exec.exec('docker', [...args, '--print']);
await exec.exec('docker', args);
core.endGroup();
} catch (error) {
core.setFailed(error.message);
}