Skip to content

Commit

Permalink
fix: env vars in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1230 committed Oct 21, 2024
1 parent 865bc27 commit 0a21530
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,35 @@ on:
- main
- dev

env:
CUDA_IMAGE_TAG: type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=cuda
CUDA_IMAGE_FLAVOR: suffix=-cuda,onlatest=true
IMAGE_NAME: ${{ github.repository }}

jobs:
build-main-image:
uses: ./.github/workflows/build-docker-image.yaml
with:
image_name: ${{ env.IMAGE_NAME }}
image_name: ${{ github.repository }}
cache_id: main

build-cuda-image:
uses: ./.github/workflows/build-docker-image.yaml
with:
image_name: ${{ env.IMAGE_NAME }}
image_name: ${{ github.repository }}
cache_id: cuda
image_tag: ${{ env.CUDA_IMAGE_TAG }}
extract_flavor: ${{ env.CUDA_IMAGE_FLAVOR }}
image_tag: type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=cuda
extract_flavor: suffix=-cuda,onlatest=true
build_args: |
USE_CUDA=true
merge-main-images:
uses: ./.github/workflows/merge-docker-images.yaml
needs: [build-main-image]
with:
image_name: ${{ env.IMAGE_NAME }}
image_name: ${{ github.repository }}
cache_id: main

merge-cuda-images:
uses: ./.github/workflows/merge-docker-images.yaml
needs: [build-cuda-image]
with:
image_name: ${{ env.IMAGE_NAME }}
image_name: ${{ github.repository }}
cache_id: cuda
extract_flavor: ${{ env.CUDA_IMAGE_FLAVOR }}
extract_tags: ${{ env.CUDA_IMAGE_TAG }}
extract_flavor: suffix=-cuda,onlatest=true
extract_tags: type=raw,enable=${{ github.ref == 'refs/heads/main' }},prefix=,suffix=,value=cuda

0 comments on commit 0a21530

Please sign in to comment.