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

(build deps): Bump crazy-max/ghaction-setup-docker from 3 to 4 #46

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
198 changes: 99 additions & 99 deletions .github/workflows/build-deps.yml
Original file line number Diff line number Diff line change
@@ -1,99 +1,99 @@
name: Build Deps

on:
workflow_dispatch:
push:
branches:
- main
- 'feature/*'

pull_request:
branches:
- main
schedule:
- cron: "0 11 * * 1,4"

jobs:
prepare:
name: Prepare Build
runs-on: ubuntu-latest
outputs:
dockerDistros: ${{ steps.set_matrix.outputs.dockerDistros }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache cake frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: build/global.json
- name: '[Prepare]'
if: steps.cache-cake.outputs.cache-hit != 'true'
run: dotnet build build/CI.sln --configuration=Release
- name: '[Matrix]'
id: set_matrix
run: dotnet run/build.dll --target=SetMatrix

build_deps:
name: Deps
needs: [ prepare ]
env:
PUSH_IMAGES: ${{github.event_name != 'pull_request' && github.repository_owner == 'GitTools'}}
runs-on: ubuntu-latest
strategy:
matrix:
distro: ${{ fromJson(needs.prepare.outputs.dockerDistros) }}
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use cached cake frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: build/global.json
- name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v3
with:
daemon-config: '{ "features": { "containerd-snapshotter": true } }'
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: 'latest'
driver-opts: 'image=moby/buildkit:buildx-stable-1'
install: true
- name: Login to DockerHub
if: success() && env.PUSH_IMAGES == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: '[Build Docker images]'
shell: pwsh
run: dotnet run/build.dll --target=DockerBuildDeps --dotnet_distro=${{ matrix.distro }} --docker_registry=dockerhub `
--push_images=${{env.PUSH_IMAGES}} --verbosity=diagnostic

- name: Login to GitHub Container Registry
if: success() && env.PUSH_IMAGES == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_GITHUB_TOKEN }}
- name: '[Build Docker images]'
shell: pwsh
run: dotnet run/build.dll --target=DockerBuildDeps --dotnet_distro=${{ matrix.distro }} --docker_registry=github `
--push_images=${{env.PUSH_IMAGES}} --verbosity=diagnostic
name: Build Deps
on:
workflow_dispatch:
push:
branches:
- main
- 'feature/*'
pull_request:
branches:
- main
schedule:
- cron: "0 11 * * 1,4"
jobs:
prepare:
name: Prepare Build
runs-on: ubuntu-latest
outputs:
dockerDistros: ${{ steps.set_matrix.outputs.dockerDistros }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache cake frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: build/global.json
- name: '[Prepare]'
if: steps.cache-cake.outputs.cache-hit != 'true'
run: dotnet build build/CI.sln --configuration=Release
- name: '[Matrix]'
id: set_matrix
run: dotnet run/build.dll --target=SetMatrix
build_deps:
name: Deps
needs: [ prepare ]
env:
PUSH_IMAGES: ${{github.event_name != 'pull_request' && github.repository_owner == 'GitTools'}}
runs-on: ubuntu-latest
strategy:
matrix:
distro: ${{ fromJson(needs.prepare.outputs.dockerDistros) }}
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use cached cake frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: build/global.json
- name: Set up Docker
uses: docker/setup-docker-action@v4
with:
daemon-config: '{ "features": { "containerd-snapshotter": true } }'
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: 'latest'
driver-opts: 'image=moby/buildkit:buildx-stable-1'
install: true
- name: Login to DockerHub
if: success() && env.PUSH_IMAGES == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: '[Build Docker images]'
shell: pwsh
run: dotnet run/build.dll --target=DockerBuildDeps --dotnet_distro=${{ matrix.distro }} --docker_registry=dockerhub `
--push_images=${{env.PUSH_IMAGES}} --verbosity=diagnostic
- name: Login to GitHub Container Registry
if: success() && env.PUSH_IMAGES == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_GITHUB_TOKEN }}
- name: '[Build Docker images]'
shell: pwsh
run: dotnet run/build.dll --target=DockerBuildDeps --dotnet_distro=${{ matrix.distro }} --docker_registry=github `
--push_images=${{env.PUSH_IMAGES}} --verbosity=diagnostic
200 changes: 100 additions & 100 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,100 +1,100 @@
name: Build

on:
workflow_dispatch:
workflow_run:
workflows: [ Build Deps ]
types:
- completed
jobs:
prepare:
name: Prepare Build
runs-on: ubuntu-latest
outputs:
dockerDistros: ${{ steps.set_matrix.outputs.dockerDistros }}
dotnetVersions: ${{ steps.set_matrix.outputs.dotnetVersions }}
dotnetVariants: ${{ steps.set_matrix.outputs.dotnetVariants }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache cake frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: build/global.json
- name: '[Prepare]'
if: steps.cache-cake.outputs.cache-hit != 'true'
run: dotnet build build/CI.sln --configuration=Release
- name: '[Matrix]'
id: set_matrix
run: dotnet run/build.dll --target=SetMatrix

build:
name: Build
needs: [ prepare ]
env:
PUSH_IMAGES: ${{github.event_name != 'pull_request' && github.repository_owner == 'GitTools'}}
runs-on: ubuntu-latest
strategy:
matrix:
distro: ${{ fromJson(needs.prepare.outputs.dockerDistros) }}
version: ${{ fromJson(needs.prepare.outputs.dotnetVersions) }}
variant: ${{ fromJson(needs.prepare.outputs.dotnetVariants) }}
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use cached cake frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: build/global.json
- name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v3
with:
daemon-config: '{ "features": { "containerd-snapshotter": true } }'
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: 'latest'
driver-opts: 'image=moby/buildkit:buildx-stable-1'
install: true
- name: Login to DockerHub
if: success() && env.PUSH_IMAGES == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: '[Build Docker images]'
shell: pwsh
run: |
dotnet run/build.dll --target=DockerBuild --dotnet_version=${{ matrix.version }} --dotnet_variant=${{ matrix.variant }} `
--dotnet_distro=${{ matrix.distro }} --docker_registry=dockerhub `
--push_images=${{env.PUSH_IMAGES}} --verbosity=diagnostic
- name: Login to GitHub Container Registry
if: success() && env.PUSH_IMAGES == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_GITHUB_TOKEN }}
- name: '[Build Docker images]'
shell: pwsh
run: |
dotnet run/build.dll --target=DockerBuild --dotnet_version=${{ matrix.version }} --dotnet_variant=${{ matrix.variant }} `
--dotnet_distro=${{ matrix.distro }} --docker_registry=github `
--push_images=${{env.PUSH_IMAGES}} --verbosity=diagnostic
name: Build
on:
workflow_dispatch:
workflow_run:
workflows: [ Build Deps ]
types:
- completed
jobs:
prepare:
name: Prepare Build
runs-on: ubuntu-latest
outputs:
dockerDistros: ${{ steps.set_matrix.outputs.dockerDistros }}
dotnetVersions: ${{ steps.set_matrix.outputs.dotnetVersions }}
dotnetVariants: ${{ steps.set_matrix.outputs.dotnetVariants }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache cake frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: build/global.json
- name: '[Prepare]'
if: steps.cache-cake.outputs.cache-hit != 'true'
run: dotnet build build/CI.sln --configuration=Release
- name: '[Matrix]'
id: set_matrix
run: dotnet run/build.dll --target=SetMatrix
build:
name: Build
needs: [ prepare ]
env:
PUSH_IMAGES: ${{github.event_name != 'pull_request' && github.repository_owner == 'GitTools'}}
runs-on: ubuntu-latest
strategy:
matrix:
distro: ${{ fromJson(needs.prepare.outputs.dockerDistros) }}
version: ${{ fromJson(needs.prepare.outputs.dotnetVersions) }}
variant: ${{ fromJson(needs.prepare.outputs.dotnetVariants) }}
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use cached cake frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: build/global.json
- name: Set up Docker
uses: docker/setup-docker-action@v4
with:
daemon-config: '{ "features": { "containerd-snapshotter": true } }'
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: 'latest'
driver-opts: 'image=moby/buildkit:buildx-stable-1'
install: true
- name: Login to DockerHub
if: success() && env.PUSH_IMAGES == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: '[Build Docker images]'
shell: pwsh
run: |
dotnet run/build.dll --target=DockerBuild --dotnet_version=${{ matrix.version }} --dotnet_variant=${{ matrix.variant }} `
--dotnet_distro=${{ matrix.distro }} --docker_registry=dockerhub `
--push_images=${{env.PUSH_IMAGES}} --verbosity=diagnostic
- name: Login to GitHub Container Registry
if: success() && env.PUSH_IMAGES == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_GITHUB_TOKEN }}
- name: '[Build Docker images]'
shell: pwsh
run: |
dotnet run/build.dll --target=DockerBuild --dotnet_version=${{ matrix.version }} --dotnet_variant=${{ matrix.variant }} `
--dotnet_distro=${{ matrix.distro }} --docker_registry=github `
--push_images=${{env.PUSH_IMAGES}} --verbosity=diagnostic
Loading