-
Notifications
You must be signed in to change notification settings - Fork 834
65 lines (55 loc) · 2.04 KB
/
images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: V2 Build docker images
on:
push:
branches: [ v2 ]
workflow_dispatch:
inputs:
docker-tag:
description: 'Docker tag for push'
default: 'latest'
required: false
jobs:
test:
name: test
runs-on: ubuntu-latest
if: github.repository == 'SeldonIO/seldon-core' # Do not run this on forks.
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: false
- name: test-operator
run: make -C operator test
- name: test-scheduler
run: make -C scheduler test
- name: test-hodometer
run: make -C hodometer test-hodometer
docker:
needs: test
runs-on: ubuntu-latest
if: github.repository == 'SeldonIO/seldon-core' # Do not run this on forks.
steps:
- name: Checkout Git Commit
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set default docker tag for builds from master
id: docker-tag
run: |
USER_INPUT="${{ github.event.inputs.docker-tag }}"
echo "value=${USER_INPUT:-latest}" >> $GITHUB_OUTPUT
- name: Echo the tags that will be used to push images
run: echo "Will push images with tag ${{ steps.docker-tag.outputs.value }}"
- name: Push Docker Image for Operator
working-directory: ./operator
run: CUSTOM_IMAGE_TAG=${{ steps.docker-tag.outputs.value }} make docker-build docker-push
- name: Push Docker Images for Scheduler
working-directory: ./scheduler
run: CUSTOM_IMAGE_TAG=${{ steps.docker-tag.outputs.value }} make docker-build-all docker-push-all
- name: Push Docker Images for Hodometer
working-directory: ./hodometer
run: BUILD_VERSION=${{ steps.docker-tag.outputs.value }} IMAGE_TAG=${{ steps.docker-tag.outputs.value }} make build-hodometer-docker push-hodometer-docker