Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

ITREX Containers Weekly Builder #54

ITREX Containers Weekly Builder

ITREX Containers Weekly Builder #54

name: ITREX Containers Weekly Builder
on:
workflow_dispatch: # Can be manually executed
schedule: # 1/week Sunday at 07:00AM
- cron: "5 7 * * 0"
permissions:
contents: read
jobs:
build:
container: # MLOps Dev container for Compose Automation
image: ${{ vars.GHA_IMAGE }}
env: # Add ENVS to control compose building
http_proxy: ${{ secrets.HTTP_PROXY }}
https_proxy: ${{ secrets.HTTPS_PROXY }}
no_proxy: ${{ secrets.NO_PROXY }}
credentials: # CAAS Registry Creds
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
runs-on: [aia-devops] # Runner Label
steps:
- uses: actions/checkout@v4
with:
# fetch-depth: 0
# submodules: recursive
set-safe-directory: true
- name: Build Container
run: docker compose build
working-directory: ./docker
push:
needs: [build]
strategy:
matrix:
container: ["devel", "prod"] # name of Compose container
container:
image: ${{ vars.GHA_IMAGE }}
env: # Add ENVS to control compose building
http_proxy: ${{ secrets.HTTP_PROXY }}
https_proxy: ${{ secrets.HTTPS_PROXY }}
no_proxy: ${{ secrets.NO_PROXY }}
credentials: # CAAS Registry Creds
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
runs-on: [aia-devops]
steps:
- uses: docker/login-action@v2
with: # CAAS Registry Creds
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Push Container # tlt-<num>-<container>
run: |
docker tag intel/ai-tools:itrex-${{ matrix.container }}-latest ${{ secrets.REGISTRY }}/aiops/mlops-ci:itrex-ww$(date +"%U")-${{ matrix.container }}
docker push ${{ secrets.REGISTRY }}/aiops/mlops-ci:itrex-ww$(date +"%U")-${{ matrix.container }}