WIP: [docker] [ci] fix dockerfiles, test docker builds in CI #3
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
name: Docker | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
# automatically cancel in-progress builds if another commit is pushed | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: dockerfile-cli | |
run: | | |
docker build \ | |
--build-arg LIGHTGBM_GIT_REF=${{ github.sha }} \ | |
- < ./docker/dockerfile-python | |
- name: dockerfile-r | |
run: | | |
docker build \ | |
--build-arg LIGHTGBM_GIT_REF=${{ github.sha }} \ | |
- < ./docker/dockerfile-r | |
- name: dockerfile-python | |
run: | | |
docker build \ | |
--build-arg LIGHTGBM_GIT_REF=${{ github.sha }} \ | |
- < ./docker/dockerfile-python | |
- name: dockerfile.gpu | |
run: | | |
docker build \ | |
--build-arg LIGHTGBM_GIT_REF=${{ github.sha }} \ | |
- < ./docker/gpu/dockerfile.gpu | |
- name: dockerfile-cli-only.gpu | |
run: | | |
docker build \ | |
--build-arg LIGHTGBM_GIT_REF=${{ github.sha }} \ | |
- < ./docker/gpu/dockerfile-cli-only.gpu | |
- name: dockerfile-cli-only-distroless.gpu | |
run: | | |
docker build \ | |
--build-arg LIGHTGBM_GIT_REF=${{ github.sha }} \ | |
- < ./docker/gpu/dockerfile-cli-only-distroless.gpu | |
all-docker-jobs-successful: | |
if: always() | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Note that all tests succeeded | |
uses: re-actors/[email protected] | |
with: | |
jobs: ${{ toJSON(needs) }} |