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

Add config-inline input #106

merged 1 commit into from Sep 3, 2021

Conversation

@crazy-max
Copy link
Member

@crazy-max crazy-max commented Sep 2, 2021

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 Sep 2, 2021
@crazy-max crazy-max requested a review from tonistiigi Sep 2, 2021
README.md Outdated
@@ -117,6 +116,39 @@ jobs:
docker build . # will run buildx
```

### Configure a registry mirror
Copy link
Member

@tonistiigi tonistiigi Sep 2, 2021

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

@crazy-max crazy-max Sep 2, 2021

Good idea, done.

Copy link
Member

@tonistiigi tonistiigi Sep 2, 2021

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

@crazy-max crazy-max Sep 3, 2021

Done

@crazy-max crazy-max force-pushed the config-inline branch 2 times, most recently from 3d860f2 to 3624e14 Sep 3, 2021
@crazy-max crazy-max requested a review from tonistiigi Sep 3, 2021
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max crazy-max merged commit 94ab11c into docker:master Sep 3, 2021
27 checks passed
@crazy-max crazy-max deleted the config-inline branch Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants