-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.1 KB
/
staging-ml.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
name: Staging Build ML API
on:
push:
branches:
- main
workflow_dispatch:
jobs:
check-changes:
name: Check for changes
runs-on: ubuntu-latest
outputs:
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get changed files in the packages/ml folder
id: changed-files
uses: tj-actions/changed-files@v40
with:
files: packages/ml/**/*
build:
name: Build + Push Image
needs: check-changes
if: needs.check-changes.outputs.any_changed == 'true'
uses: ./.github/workflows/build-push.yml
with:
CONTEXT: ./packages/ml
TARGET: prod
IMAGE_NAME: ml
# Only used with nektos/act to test locally
# secrets:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
skip-build:
name: Skip Build
needs: check-changes
if: needs.check-changes.outputs.any_changed != 'true'
runs-on: ubuntu-latest
steps:
- name: Skip Build
run: echo "Skipping build because there are no changes in packages/ml"