Skip to content

Add config-inline input#106

Merged
crazy-max merged 1 commit intodocker:masterfrom
crazy-max:config-inline
Sep 3, 2021
Merged

Add config-inline input#106
crazy-max merged 1 commit intodocker:masterfrom
crazy-max:config-inline

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
@crazy-max crazy-max requested a review from tonistiigi September 2, 2021 20:46
README.md Outdated
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

@crazy-max crazy-max force-pushed the config-inline branch 2 times, most recently from 3d860f2 to 3624e14 Compare September 3, 2021 11:48
@crazy-max crazy-max requested a review from tonistiigi September 3, 2021 11:49
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.

2 participants

Comments