@@ -17,18 +17,21 @@ jobs:
1717 with :
1818 output-artifact-name : lottie-to-png.linux.${{ matrix.arch }}
1919 arch : ${{ matrix.arch }}
20+ version : ${{ github.ref_name }}
2021
2122 build-darwin :
2223 name : Build Darwin executable
2324 uses : ./.github/workflows/build-darwin.yml
2425 with :
2526 output-artifact-name : lottie-to-png.darwin.amd64
27+ version : ${{ github.ref_name }}
2628
2729 build-windows :
2830 name : Build Windows executable
2931 uses : ./.github/workflows/build-windows.yml
3032 with :
3133 output-artifact-name : lottie-to-png.windows.amd64.exe
34+ version : ${{ github.ref_name }}
3235
3336 push-docker-image :
3437 name : Push images to DockerHub
@@ -80,39 +83,45 @@ jobs:
8083 username : ${{ secrets.DOCKERHUB_USERNAME }}
8184 password : ${{ secrets.DOCKERHUB_TOKEN }}
8285
83- - name : Create manifest
86+ - name : Create manifest of latest tag
8487 run : docker manifest create ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }}:latest --amend ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }}:amd64 --amend ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }}:arm64
8588
86- - name : Push manifest
89+ - name : Push manifest of latest tag
8790 run : docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }}:latest
8891
92+ - name : Create manifest of version tag
93+ run : docker manifest create ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }}:${{ github.ref_name }} --amend ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }}:amd64 --amend ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }}:arm64
94+
95+ - name : Push manifest of version tag
96+ run : docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }}:${{ github.ref_name }}
97+
8998 - name : Make format uppercase
9099 id : format
91100 uses : ASzc/change-string-case-action@v5
92101 with :
93102 string : ${{ matrix.format }}
94103
95104 - uses : actions/checkout@v4
96-
97- - name : Find and replace FORMAT
98- uses : jacobtomlinson/gha-find- replace@v3
105+
106+ - name : Find and replace FORMAT in readme for DockerHub
107+ uses : ./.github/actions/ replace-text
99108 with :
100- find : FORMAT
101- replace : ${{ steps.format.outputs.uppercase }}
102- regex : false
109+ file : README.dockerhub.md
110+ old-string : FORMAT
111+ new-string : ${{ steps.format.outputs.uppercase }}
103112
104- - name : Find and replace format
105- uses : jacobtomlinson/gha-find- replace@v3
113+ - name : Find and replace format in readme for DockerHub
114+ uses : ./.github/actions/ replace-text
106115 with :
107- find : format
108- replace : ${{ matrix. format }}
109- regex : false
116+ file : README.dockerhub.md
117+ old-string : format
118+ new-string : ${{ matrix.format }}
110119
111120 - name : Update description at DockerHub
112121 uses : peter-evans/dockerhub-description@v3
113122 with :
114123 username : ${{ secrets.DOCKERHUB_USERNAME }}
115- password : ${{ secrets.DOCKERHUB_PASSWORD }}
124+ password : ${{ secrets.DOCKERHUB_TOKEN }}
116125 repository : ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }}
117126 short-description : Converts Lottie Animations (.json / .lottie) and Telegram stickers (*.tgs) to ${{ steps.format.outputs.uppercase }}}
118127 readme-filepath : README.dockerhub.md
@@ -136,6 +145,11 @@ jobs:
136145 steps :
137146 - uses : actions/checkout@v3
138147
148+ - name : Replace version
149+ uses : ./.github/actions/replace-version
150+ with :
151+ version : ${{ github.ref_name }}
152+
139153 - name : Download artifact
140154 uses : actions/download-artifact@v3
141155 with :
0 commit comments