Skip to content

Update Influx

Update Influx #8

Workflow file for this run

name: "Render"
on:
push:
branches-ignore: [master]
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: ${{ !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/
steps:
- name: "Debug CTX github"
if: ${{ !github.event.act }}
continue-on-error: true
env:
GITHUB_CTX: ${{ toJSON(github) }}
run: echo "$GITHUB_CTX"
- 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 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
# 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 }}
- name: "Deploy Branch"
if: ${{ !inputs.version }}
uses: cssnr/web-request-action@v1
with:
url: ${{ secrets.RENDER_HOOK }}
params: |
ref: ${{ github.ref_name }}