Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config-inline input #106

Merged
merged 1 commit into from Sep 3, 2021
Merged

Conversation

crazy-max
Copy link
Member

Allow inline config for BuildKit in the workflow. Could be useful to load a config dynamically:

name: ci

on:
  push:

jobs:
  buildx:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
        with:
          config-inline: |
            debug = true
            [registry."docker.io"]
              mirrors = ["mirror.gcr.io"]
      -
        name: Pull
        run: |
          docker pull alpine:latest # will pull mirror.gcr.io/alpine:latest

Signed-off-by: CrazyMax crazy-max@users.noreply.github.com

@crazy-max crazy-max force-pushed the config-inline branch 2 times, most recently from 371b508 to ab73612 Compare September 2, 2021 20:22
README.md Outdated
@@ -117,6 +116,39 @@ jobs:
docker build . # will run buildx
```

### Configure a registry mirror
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/tonistiigi/binfmt/blob/master/.github/buildkit.toml is a somewhat nice pattern as well. Maybe we should show it as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, done.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I thought that sometimes I would prefer putting a file under .github to trying to inline toml inside yaml. Maybe intro "providing a toml configuration with a file or inline block" and leave one example to use one and second another syntax.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max crazy-max merged commit 94ab11c into docker:master Sep 3, 2021
@crazy-max crazy-max deleted the config-inline branch September 3, 2021 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants