10
10
CARGO_TERM_COLOR : always
11
11
TEST_IMAGE_NAME : " orchestr8-tests:0"
12
12
LINT_IMAGE_NAME : " orchestr8-lint:0"
13
+ FMT_IMAGE_NAME : " orchestr8-fmt:0"
13
14
14
15
jobs :
15
16
build :
20
21
env :
21
22
CACHE_TEST_IMAGE : " ghcr.io/foundation-model-stack/fms-guardrails-orchestrator:test-cache"
22
23
CACHE_LINT_IMAGE : " ghcr.io/foundation-model-stack/fms-guardrails-orchestrator:lint-cache"
24
+ CACHE_FMT_IMAGE : " ghcr.io/foundation-model-stack/fms-guardrails-orchestrator:fmt-cache"
23
25
CACHE_REGISTRY : " ghcr.io"
24
26
25
27
steps :
@@ -50,12 +52,15 @@ jobs:
50
52
#CACHE_TO="type=gha,mode=min"
51
53
CACHE_TEST_TO="type=inline"
52
54
CACHE_LINT_TO="type=inline"
55
+ CACHE_FMT_TO="type=inline"
53
56
else
54
57
CACHE_TEST_TO="type=registry,ref=${{ env.CACHE_TEST_IMAGE }},mode=max"
55
58
CACHE_LINT_TO="type=registry,ref=${{ env.CACHE_LINT_IMAGE }},mode=max"
59
+ CACHE_FMT_TO="type=registry,ref=${{ env.CACHE_FMT_IMAGE }},mode=max"
56
60
fi
57
61
echo "CACHE_TEST_TO=$CACHE_TEST_TO" >> $GITHUB_ENV
58
62
echo "CACHE_LINT_TO=$CACHE_LINT_TO" >> $GITHUB_ENV
63
+ echo "CACHE_FMT_TO=$CACHE_FMT_TO" >> $GITHUB_ENV
59
64
- name : Test
60
65
uses : docker/build-push-action@v5
61
66
with :
76
81
cache-to : ${{ env.CACHE_LINT_TO }}
77
82
push : false
78
83
platforms : linux/amd64
84
+ - name : Format
85
+ uses : docker/build-push-action@v5
86
+ with :
87
+ context : .
88
+ target : format
89
+ tags : ${{ env.FMT_IMAGE_NAME }}
90
+ cache-from : type=registry,ref=${{ env.CACHE_FMT_IMAGE }}
91
+ cache-to : ${{ env.CACHE_FMT_TO }}
92
+ push : false
93
+ platforms : linux/amd64
79
94
0 commit comments