File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change 16
16
17
17
steps :
18
18
- uses : actions/checkout@v3
19
+ with :
20
+ fetch-depth : 0
21
+
22
+ - name : Get Most Recent Tag
23
+ id : most-recent-tag
24
+ uses : " WyriHaximus/github-action-get-previous-tag@v1"
19
25
20
26
- name : Log in with Azure
21
27
uses : azure/login@v1
@@ -35,25 +41,25 @@ jobs:
35
41
- name : Run cibuild
36
42
run : ./scripts/cibuild
37
43
38
- - name : Get image tag
39
- id : get_image_tag
44
+ - name : Publish Image
45
+ id : publish_image
40
46
run :
41
47
case "${GITHUB_REF}" in
42
48
*tags*)
43
49
echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT ;
44
- echo " acr= pccomponents" >> $GITHUB_OUTPUT
50
+ ./scripts/cipublish -- acr pccomponents --tag ${{tag}}
45
51
;;
46
52
*)
53
+ echo "Publishing to pccomponentstest as latest" ;
47
54
echo "tag=latest" >> $GITHUB_OUTPUT ;
48
- echo "acr=pccomponentstest" >> $GITHUB_OUTPUT
55
+ ./scripts/cipublish --acr pccomponentstest --tag latest ;
56
+ echo "Also publishing to pccomponents ACR with unique tag" ;
57
+ ./scripts/cipublish --acr pccomponents --tag ${{ steps.most-recent-tag.outputs.tag }}.${{ github.run_number }}
49
58
;;
50
59
esac
51
60
52
- - name : Publish images
53
- run : ./scripts/cipublish --acr ${{steps.get_image_tag.outputs.acr}} --tag ${{steps.get_image_tag.outputs.tag}}
54
-
55
61
outputs :
56
- image_tag : ${{ steps.get_image_tag .outputs.tag }}
62
+ image_tag : ${{ steps.publish_image .outputs.tag }}
57
63
58
64
deploy :
59
65
runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments