File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,23 +23,30 @@ jobs:
2323 username : ${{ secrets.JUSTRUNMY_REGISTRY_USERNAME }}
2424 password : ${{ secrets.JUSTRUNMY_REGISTRY_PASSWORD }}
2525
26- - name : Resolve v2 image tag
26+ - name : Resolve JustRunMy image tags
2727 id : image
2828 shell : bash
2929 run : |
30- image ="${{ secrets.JUSTRUNMY_IMAGE }}"
31- if [ -z "$image " ]; then
30+ base_image ="${{ secrets.JUSTRUNMY_IMAGE }}"
31+ if [ -z "$base_image " ]; then
3232 echo "JUSTRUNMY_IMAGE secret is missing"
3333 exit 1
3434 fi
35- image="${image//v1_autodeploy/v2_autodeploy}"
36- image="${image/:v1_/:v2_}"
37- image="${image/%:v1/:v2}"
38- echo "tag=$image" >> "$GITHUB_OUTPUT"
35+ v2_image="${base_image//v1_autodeploy/v2_autodeploy}"
36+ v2_image="${v2_image/:v1_/:v2_}"
37+ v2_image="${v2_image/%:v1/:v2}"
38+ {
39+ echo "tags<<EOF"
40+ echo "$base_image"
41+ if [ "$v2_image" != "$base_image" ]; then
42+ echo "$v2_image"
43+ fi
44+ echo "EOF"
45+ } >> "$GITHUB_OUTPUT"
3946
4047 - name : Build and push Docker image
4148 uses : docker/build-push-action@v6
4249 with :
4350 context : .
4451 push : true
45- tags : ${{ steps.image.outputs.tag }}
52+ tags : ${{ steps.image.outputs.tags }}
Original file line number Diff line number Diff line change 3232 - name : Push to JustRunMyApp remote
3333 run : |
3434 git remote add jrnm "${{ secrets.JRNM_GIT_URL }}"
35- git push jrnm HEAD:deploy --force
35+ git push jrnm HEAD:deploy --force 2>&1 | tee jrnm-push.log
36+ if grep -qi "Error processing git push\\|No matching nodes" jrnm-push.log; then
37+ echo "JustRunMyApp reported a failed redeploy."
38+ exit 1
39+ fi
You can’t perform that action at this time.
0 commit comments