File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change 1
1
name : Docker publish
2
2
3
3
on :
4
+ workflow_dispatch :
4
5
push :
5
6
branches :
6
7
- next
@@ -36,17 +37,12 @@ jobs:
36
37
run : |
37
38
# --quiet should turn off progress bars to make logs more readable
38
39
conda env create
39
- - name : Get version
40
- id : version
41
- run : |
42
- conda activate livedata
43
- echo "version=$(versioningit)" >> $GITHUB_OUTPUT
44
40
45
41
- name : Create tag version
46
42
id : tag
47
43
run : |
48
44
conda activate livedata
49
- echo "tag=$(versioningit).b$(date +'%Y%m%d%H%M') " >> $GITHUB_OUTPUT
45
+ echo "tag=$(versioningit)" >> $GITHUB_OUTPUT
50
46
51
47
- name : Create latest tag version
52
48
id : latest_tag
88
84
with :
89
85
context : .
90
86
file : Dockerfile
91
- tags : |
92
- ${{ env.REGISTRY }}/${{ github.repository }}/live_data_server:${{ steps.latest_tag.outputs.latest_tag }}
93
- ${{ env.REGISTRY }}/${{ github.repository }}/live_data_server:${{ steps.tag.outputs.tag }}
87
+ tags : ${{ env.REGISTRY }}/${{ github.repository }}/live_data_server:${{ steps.latest_tag.outputs.latest_tag }}
88
+ push : true
89
+
90
+ - name : Push version tag only for main branch
91
+ if : github.ref == 'refs/heads/main'
92
+ uses : docker/build-push-action@v6
93
+ with :
94
+ context : .
95
+ file : Dockerfile
96
+ tags : ${{ env.REGISTRY }}/${{ github.repository }}/live_data_server:${{ steps.tag.outputs.tag }}
94
97
push : true
You can’t perform that action at this time.
0 commit comments