File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 2222 description : ' The ref build matrix as JSON string (list of git refs to build/deploy).'
2323 required : false
2424 type : string
25+ can_registry :
26+ description : ' Determines whether this workflow will also registry (login and push).'
27+ required : false
28+ type : boolean
2529 # ##
2630 # ## Secrets
2731 # ##
@@ -264,3 +268,23 @@ jobs:
264268 with :
265269 command : |
266270 make manifest-push NAME=${{ matrix.name }} VERSION="${{ matrix.version }}" TAG=${{ steps.tag.outputs.docker-tag }}
271+
272+ # ------------------------------------------------------------
273+ # REGISTRY
274+ # ------------------------------------------------------------
275+ - name : " [REGISTRY] Login"
276+ uses : docker/login-action@v3
277+ with :
278+ registry : ${{ secrets.REGISTRY_URL }}
279+ username : ${{ secrets.REGISTRY_USERNAME }}
280+ password : ${{ secrets.REGISTRY_PASSWORD }}
281+ if : inputs.can_registry
282+
283+ - name : " [REGISTRY] Push"
284+ uses : linuxeye/shell-command-retry-action@master
285+ with :
286+ command : |
287+ docker pull bypanel/${{ matrix.name }}:${{ steps.tag.outputs.docker-tag }}
288+ docker tag bypanel/${{ matrix.name }}:${{ steps.tag.outputs.docker-tag }} ${{ secrets.REGISTRY_URL }}/bypanel/${{ matrix.name }}:${{ steps.tag.outputs.docker-tag }}
289+ docker push ${{ secrets.REGISTRY_URL }}/bypanel/${{ matrix.name }}:${{ steps.tag.outputs.docker-tag }}
290+ if : inputs.can_registry
Original file line number Diff line number Diff line change @@ -288,4 +288,4 @@ jobs:
288288 docker pull bypanel/${{ matrix.name }}:${{ steps.tag.outputs.docker-tag }}
289289 docker tag bypanel/${{ matrix.name }}:${{ steps.tag.outputs.docker-tag }} ${{ secrets.REGISTRY_URL }}/bypanel/${{ matrix.name }}:${{ steps.tag.outputs.docker-tag }}
290290 docker push ${{ secrets.REGISTRY_URL }}/bypanel/${{ matrix.name }}:${{ steps.tag.outputs.docker-tag }}
291- if : inputs.can_registry
291+ if : inputs.can_registry
You can’t perform that action at this time.
0 commit comments