@@ -2,6 +2,7 @@ name: "Render"
22
33on :
44 push :
5+ branches-ignore : [master]
56 workflow_call :
67 # inputs:
78 # version:
2021
2122jobs :
2223 render :
24+ if : ${{ !contains(github.event.head_commit.message, '#norender') }}
2325 # if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
2426 # if: ${{ github.event.workflow_run.conclusion != '' && github.event.workflow_run.conclusion == 'success' || true }}
2527 name : " Render"
2628 runs-on : ubuntu-latest
2729 timeout-minutes : 5
2830
29- # environment:
30- # name: render
31- # url: https://node-badges.onrender.com/
31+ environment :
32+ name : render
33+ url : https://node-badges.onrender.com/
3234
3335 steps :
3436 - name : " Debug CTX github"
@@ -38,36 +40,41 @@ jobs:
3840 GITHUB_CTX : ${{ toJSON(github) }}
3941 run : echo "$GITHUB_CTX"
4042
41- - name : " Debug 1 "
43+ - name : " Debug Branch ref "
4244 continue-on-error : true
4345 run : |
4446 echo "github.ref_name: ${{ github.ref_name }}"
4547 echo "inputs.version: ${{ inputs.version }}"
4648 echo "env.version: ${{ env.version }}"
49+ echo "--------------------"
50+ echo "ref: ${{ github.ref_name }}"
4751
48- - name : " Debug 2 "
52+ - name : " Debug Image version "
4953 continue-on-error : true
5054 env :
5155 version : ${{ env.version == 'master' && 'latest' || env.version }}
5256 run : |
57+ echo "github.ref_name: ${{ github.ref_name }}"
58+ echo "inputs.version: ${{ inputs.version }}"
5359 echo "env.version: ${{ env.version }}"
60+ echo "--------------------"
5461 echo "imgURL: ghcr.io/${{ github.repository }}:${{ env.version }}"
55- echo "ref: ${{ env.version }}"
5662
57- # # https://render.com/docs/deploy-hooks#deploying-from-an-image-registry
58- # - name: "Render Deploy"
59- # uses: cssnr/web-request-action@v1
60- # env:
61- # version: ${{ env.version == 'master' && 'latest' || env.version }}
62- # with:
63- # url: ${{ secrets.RENDER_HOOK }}
64- # params: '{"imgURL": "ghcr.io/${{ github.repository }}:${{ env.version }}"}'
65-
66- - name : " Render Deploy"
63+ # https://render.com/docs/deploy-hooks#deploying-from-an-image-registry
64+ - name : " Deploy Image"
65+ if : ${{ inputs.version }}
6766 uses : cssnr/web-request-action@v1
6867 env :
6968 version : ${{ env.version == 'master' && 'latest' || env.version }}
7069 with :
7170 url : ${{ secrets.RENDER_HOOK }}
7271 params : |
73- ref: ${{ env.version }}
72+ imgURL: ghcr.io/${{ github.repository }}:${{ env.version }}
73+
74+ - name : " Deploy Branch"
75+ if : ${{ !inputs.version }}
76+ uses : cssnr/web-request-action@v1
77+ with :
78+ url : ${{ secrets.RENDER_HOOK }}
79+ params : |
80+ ref: ${{ github.ref_name }}
0 commit comments