mirror of
https://github.com/docker/bake-action.git
synced 2025-07-14 12:41:53 +02:00
Print bake def (#4)
This commit is contained in:
8
.github/CONTRIBUTING.md
vendored
8
.github/CONTRIBUTING.md
vendored
@ -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)
|
||||
|
@ -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
4
dist/index.js
generated
vendored
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user