Skip to content

Test GH script

Test GH script #1

Workflow file for this run

---
name: Test GH script
on:
workflow_dispatch:
inputs:
version:
description: "EteBase Version"
required: false
default: "master"
type: string
pushit:
description: "Should push?"
required: false
default: false
type: boolean
tag:
description: "Custom Tag"
required: false
default: ""
type: string
jobs:
run-ghscript:
runs-on: ubuntu-latest
outputs:
ete_version: ${{ steps.get_version.outputs.version }}
steps:
- name: Checkout Version and Workflow files
uses: actions/checkout@v4
- id: get_version
name: Get Server Version
uses: ./.github/actions/get-server-version
with:
version: ${{ inputs.version }}
- id: process_version
name: Process Version data
uses: ./.github/actions/process-version
with:
version: ${{ steps.get_version.outputs.version }}
- name: Metadata Output
shell: bash
run: |
echo '########## inputs ##########'
echo "version: ${{ github.event.inputs.version }}"
echo "tag: ${{ github.event.inputs.tag }}"
echo "pushit: ${{ github.event.inputs.pushit }}"
echo '########## ete-version ##########'
echo "ete-version: ${{ steps.get_version.outputs.version }}"
echo '########## server_version ##########'
echo "etebase: ${{ steps.process_version.outputs.ete_version }}"
echo "semver: ${{ steps.process_version.outputs.is_semver }}"
echo "python: v${{ steps.process_version.outputs.py_version }}"
- id: ghscript
uses: actions/github-script@v7
with:
retries: 3
retry-exempt-status-codes: 400,401
script: |
const vEB = '${{ steps.process_version.outputs.version }}'
const vPY = '${{ steps.process_version.outputs.py_version }}'
const util = require('util')
console.log(util.inspect(context, {showHidden: false, depth: null, colors: true}))