-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #497 from pl4nty/Main
Add example GitHub Actions workflow for BuildKit
- Loading branch information
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# BuildKit GitHub Actions Example | ||
|
||
[Docker is pinned to v24.0.7](https://github.com/actions/runner-images/issues/9478) on GitHub Actions hosted Windows runners, so containerd and BuildKit need to be installed manually. | ||
|
||
This [workflow file](./install_buildkit_workflow.yaml) can be used as an example. |
33 changes: 33 additions & 0 deletions
33
helpful_tools/GitHubActions/install_buildkit_workflow.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
main: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Setup containerd | ||
run: | | ||
$version = "1.7.15" | ||
curl.exe -L https://github.com/containerd/containerd/releases/download/v$version/containerd-$version-windows-amd64.tar.gz -o containerd.tar.gz | ||
tar.exe xvf containerd.tar.gz | ||
.\bin\containerd.exe --register-service | ||
Start-Service containerd | ||
- name: Setup BuildKit | ||
run: | | ||
$version = "v0.13.1" | ||
curl.exe -L https://github.com/moby/buildkit/releases/download/$version/buildkit-$version.windows-amd64.tar.gz -o buildkit.tar.gz | ||
tar.exe xvf buildkit.tar.gz | ||
.\bin\buildkitd.exe --register-service | ||
Start-Service buildkitd | ||
- name: Setup Docker Buildx | ||
run: | | ||
$version = "v0.13.1" | ||
curl.exe -L https://github.com/docker/buildx/releases/download/$version/buildx-$version.windows-amd64.exe -o $env:ProgramData\Docker\cli-plugins\docker-buildx.exe | ||
- uses: docker/setup-buildx-action@v3.2.0 | ||
with: | ||
driver: remote | ||
endpoint: npipe:////./pipe/buildkitd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters