Skip to content

Commit df87ea2

Browse files
authored
Add job image build (#284)
1 parent f9c1284 commit df87ea2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/build-and-push.yaml

+11-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
echo "SHA: ${{ github.event.pull_request.head.sha }}"
5858
echo "MAIN IMAGE AT: ${{ vars.QUAY_RELEASE_REPO }}:latest"
5959
echo "LMES DRIVER IMAGE AT: ${{ vars.QUAY_RELEASE_LMES_DRIVER_REPO }}:latest"
60+
echo "LMES JOB IMAGE AT: ${{ vars.QUAY_RELEASE_LMES_JOB_REPO }}:latest"
6061
echo "CI IMAGE AT: quay.io/trustyai/trustyai-service-operator-ci:${{ github.event.pull_request.head.sha }}"
6162
#
6263
# Set environments depending on context
@@ -66,18 +67,21 @@ jobs:
6667
echo "TAG=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
6768
echo "IMAGE_NAME=quay.io/trustyai/trustyai-service-operator-ci" >> $GITHUB_ENV
6869
echo "DRIVER_IMAGE_NAME=quay.io/trustyai/ta-lmes-driver-ci" >> $GITHUB_ENV
70+
echo "JOB_IMAGE_NAME=quay.io/trustyai/ta-lmes-job-ci" >> $GITHUB_ENV
6971
- name: Set main-branch environment
7072
if: env.BUILD_CONTEXT == 'main'
7173
run: |
7274
echo "TAG=latest" >> $GITHUB_ENV
7375
echo "IMAGE_NAME=${{ vars.QUAY_RELEASE_REPO }}" >> $GITHUB_ENV
7476
echo "DRIVER_IMAGE_NAME=${{ vars.QUAY_RELEASE_LMES_DRIVER_REPO }}" >> $GITHUB_ENV
77+
echo "JOB_IMAGE_NAME=${{ vars.QUAY_RELEASE_LMES_JOB_REPO }}" >> $GITHUB_ENV
7578
- name: Set tag environment
7679
if: env.BUILD_CONTEXT == 'tag'
7780
run: |
7881
echo "TAG=${{ github.ref_name }}" >> $GITHUB_ENV
7982
echo "IMAGE_NAME=${{ vars.QUAY_RELEASE_REPO }}" >> $GITHUB_ENV
8083
echo "DRIVER_IMAGE_NAME=${{ vars.QUAY_RELEASE_LMES_DRIVER_REPO }}" >> $GITHUB_ENV
84+
echo "JOB_IMAGE_NAME=${{ vars.QUAY_RELEASE_LMES_JOB_REPO }}" >> $GITHUB_ENV
8185
8286
# Run docker commands
8387
- name: Put expiry date on CI-tagged image
@@ -93,6 +97,10 @@ jobs:
9397
run: docker build -f Dockerfile.driver -t ${{ env.DRIVER_IMAGE_NAME }}:$TAG .
9498
- name: Push LMES driver image to Quay
9599
run: docker push ${{ env.DRIVER_IMAGE_NAME }}:$TAG
100+
- name: Build LMES job image
101+
run: docker build -f Dockerfile.lmes-job -t ${{ env.JOB_IMAGE_NAME }}:$TAG .
102+
- name: Push LMES job image to Quay
103+
run: docker push ${{ env.JOB_IMAGE_NAME }}:$TAG
96104

97105
# Create CI Manifests
98106
- name: Set up manifests for CI
@@ -133,7 +141,9 @@ jobs:
133141
134142
📦 [PR image](https://quay.io/trustyai/trustyai-service-operator-ci:${{ github.event.pull_request.head.sha }}): `quay.io/trustyai/trustyai-service-operator-ci:${{ github.event.pull_request.head.sha }}`
135143
136-
📦 [Driver image](https://quay.io/trustyai/ta-lmes-driver:${{ github.event.pull_request.head.sha }}): `quay.io/trustyai/ta-lmes-driver:${{ github.event.pull_request.head.sha }}`
144+
📦 [LMES driver image](https://quay.io/trustyai/ta-lmes-driver:${{ github.event.pull_request.head.sha }}): `quay.io/trustyai/ta-lmes-driver:${{ github.event.pull_request.head.sha }}`
145+
146+
📦 [LMES job image](https://quay.io/trustyai/ta-lmes-job:${{ github.event.pull_request.head.sha }}): `quay.io/trustyai/ta-lmes-job:${{ github.event.pull_request.head.sha }}`
137147
138148
🗂️ [CI manifests](https://github.com/trustyai-explainability/trustyai-service-operator-ci/tree/operator-${{ env.TAG }})
139149

0 commit comments

Comments
 (0)