|
| 1 | +name: TLT Containers Weekly Builder |
| 2 | +on: |
| 3 | + workflow_dispatch: # Can be manually executed |
| 4 | + schedule: # 1/week Sunday at 11:00PM |
| 5 | + - cron: "5 23 * * 0" |
| 6 | +jobs: |
| 7 | + build: |
| 8 | + container: # MLOps Dev container for Compose Automation |
| 9 | + image: ${{ vars.GHA_CONTAINER_IMAGE }} |
| 10 | + env: # Add ENVS to control compose building |
| 11 | + http_proxy: ${{ secrets.HTTP_PROXY }} |
| 12 | + https_proxy: ${{ secrets.HTTPS_PROXY }} |
| 13 | + no_proxy: ${{ secrets.NO_PROXY }} |
| 14 | + credentials: # CAAS Registry Creds |
| 15 | + username: ${{ secrets.REGISTRY_USER }} |
| 16 | + password: ${{ secrets.REGISTRY_TOKEN }} |
| 17 | + runs-on: [aia-devops] # Runner Label |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v3 |
| 20 | + with: |
| 21 | + submodules: true |
| 22 | + set-safe-directory: true |
| 23 | + - name: Build Container |
| 24 | + run: docker compose build |
| 25 | + working-directory: ./docker |
| 26 | + push: |
| 27 | + needs: [build] |
| 28 | + strategy: |
| 29 | + matrix: |
| 30 | + container: ["tlt-devel", "tlt-prod", "tlt-dist-devel", "tlt-dist-prod"] # name of Compose container |
| 31 | + container: |
| 32 | + image: ${{ vars.GHA_CONTAINER_IMAGE }} |
| 33 | + env: # Add ENVS to control compose building |
| 34 | + http_proxy: ${{ secrets.HTTP_PROXY }} |
| 35 | + https_proxy: ${{ secrets.HTTPS_PROXY }} |
| 36 | + no_proxy: ${{ secrets.NO_PROXY }} |
| 37 | + credentials: # CAAS Registry Creds |
| 38 | + username: ${{ secrets.REGISTRY_USER }} |
| 39 | + password: ${{ secrets.REGISTRY_TOKEN }} |
| 40 | + runs-on: [aia-devops] |
| 41 | + steps: |
| 42 | + - uses: docker/login-action@v2 |
| 43 | + with: # CAAS Registry Creds |
| 44 | + registry: ${{ vars.GHA_REGISTRY }} |
| 45 | + username: ${{ secrets.REGISTRY_USER }} |
| 46 | + password: ${{ secrets.REGISTRY_TOKEN }} |
| 47 | + - name: Push Container # tlt-<num>-<container> |
| 48 | + run: | |
| 49 | + docker tag intel/ai-tools:${{ matrix.container }}-latest ${{ vars.GHA_REGISTRY_REPO }}:ww$(date +"%U")-${{ matrix.container }} |
| 50 | + docker push ${{ vars.GHA_REGISTRY_REPO }}:ww$(date +"%U")-${{ matrix.container }} |
0 commit comments