Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/disabled/render.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: "Render"

on:
push:
workflow_call:
#inputs:
# version:
# description: "Version Tag"
# type: string
workflow_dispatch:
inputs:
version:
description: "Version Tag"
#workflow_run:
# workflows: ["Build"]
# types: [completed]

env:
version: ${{ inputs.version || github.ref_name }}

jobs:
render:
#if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
#if: ${{ github.event.workflow_run.conclusion != '' && github.event.workflow_run.conclusion == 'success' || true }}
name: "Render"
runs-on: ubuntu-latest
timeout-minutes: 5

#environment:
# name: render
# url: https://node-badges.onrender.com/

steps:
- name: "Debug CTX github"
if: ${{ !github.event.act }}
continue-on-error: true
env:
GITHUB_CTX: ${{ toJSON(github) }}
run: echo "$GITHUB_CTX"

- name: "Debug 1"
continue-on-error: true
run: |
echo "github.ref_name: ${{ github.ref_name }}"
echo "inputs.version: ${{ inputs.version }}"
echo "env.version: ${{ env.version }}"

- name: "Debug 2"
continue-on-error: true
env:
version: ${{ env.version == 'master' && 'latest' || env.version }}
run: |
echo "env.version: ${{ env.version }}"
echo "imgURL: ghcr.io/${{ github.repository }}:${{ env.version }}"
echo "ref: ${{ env.version }}"

## https://render.com/docs/deploy-hooks#deploying-from-an-image-registry
#- name: "Render Deploy"
# uses: cssnr/web-request-action@v1
# env:
# version: ${{ env.version == 'master' && 'latest' || env.version }}
# with:
# url: ${{ secrets.RENDER_HOOK }}
# params: '{"imgURL": "ghcr.io/${{ github.repository }}:${{ env.version }}"}'

- name: "Render Deploy"
uses: cssnr/web-request-action@v1
env:
version: ${{ env.version == 'master' && 'latest' || env.version }}
with:
url: ${{ secrets.RENDER_HOOK }}
params: |
ref: ${{ env.version }}
33 changes: 26 additions & 7 deletions .github/workflows/render.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: "Render"

on:
push:
branches-ignore: [master]
workflow_call:
#inputs:
# version:
Expand All @@ -19,15 +21,16 @@ env:

jobs:
render:
if: ${{ !contains(github.event.head_commit.message, '#norender') }}
#if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
#if: ${{ github.event.workflow_run.conclusion != '' && github.event.workflow_run.conclusion == 'success' || true }}
name: "Render"
runs-on: ubuntu-latest
timeout-minutes: 5

#environment:
# name: render
# url: https://node-badges.onrender.com/
environment:
name: render
url: https://node-badges.onrender.com/

steps:
- name: "Debug CTX github"
Expand All @@ -37,26 +40,42 @@ jobs:
GITHUB_CTX: ${{ toJSON(github) }}
run: echo "$GITHUB_CTX"

- name: "Debug 1"
- name: "Debug Branch ref"
continue-on-error: true
run: |
echo "github.ref_name: ${{ github.ref_name }}"
echo "inputs.version: ${{ inputs.version }}"
echo "env.version: ${{ env.version }}"
echo "--------------------"
echo "ref: ${{ github.ref_name }}"

- name: "Debug 2"
- name: "Debug Image version"
continue-on-error: true
env:
version: ${{ env.version == 'master' && 'latest' || env.version }}
run: |
echo "github.ref_name: ${{ github.ref_name }}"
echo "inputs.version: ${{ inputs.version }}"
echo "env.version: ${{ env.version }}"
echo "--------------------"
echo "imgURL: ghcr.io/${{ github.repository }}:${{ env.version }}"

# https://render.com/docs/deploy-hooks#deploying-from-an-image-registry
- name: "Render Deploy"
# NOTE: Confirm we can do image and dockerfile deployments simultaneously...
- name: "Deploy Image"
if: ${{ inputs.version }}
uses: cssnr/web-request-action@v1
env:
version: ${{ env.version == 'master' && 'latest' || env.version }}
with:
url: ${{ secrets.RENDER_HOOK }}
params: '{"imgURL": "ghcr.io/${{ github.repository }}:${{ env.version }}"}'
params: |
imgURL: ghcr.io/${{ github.repository }}:${{ env.version }}

- name: "Deploy Branch"
if: ${{ !inputs.version }}
uses: cssnr/web-request-action@v1
with:
url: ${{ secrets.RENDER_HOOK }}
params: |
ref: ${{ github.ref_name }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN --mount=type=cache,target=/root/.npm npm ci

COPY --chown=node:node ./src ./src

ARG VERSION="Source"
ARG VERSION="Dockerfile"
ENV APP_VERSION="${VERSION}"
LABEL org.opencontainers.image.version="${VERSION}"

Expand Down
2 changes: 0 additions & 2 deletions render.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ services:
- type: web
name: node-badges
plan: free
previews:
generation: automatic
runtime: docker
repo: https://github.com/smashedr/node-badges
autoDeployTrigger: off
Expand Down