AEM Github actions to manage time into the workflows
Get the time in the specified time zone
- name: Get Time
id: time
uses: nanzm/get-time-action@v1.1
with:
timeZone: 8
format: 'YYYY-MM-DD-HH-mm-ss'
- name: Usage
env:
TIME: "${{ steps.time.outputs.time }}"
run: |
echo $TIME| Parameter | Required | Info |
|---|---|---|
timeZone |
false |
time Zone Default: 0 |
format |
false |
timestamp format string Default: '' |
| Parameter | Info |
|---|---|
time |
time in the specified time zone |
This action accepts any string, and outputs three different versions of that string:
- lowercase (
XyZzY->xyzzy) - uppercase (
XyZzY->XYZZY) - capitalized (
Xyzzy->Xyzzy)
You can access the outputted strings through the job outputs context. See docs here, or the Example Usage section below.
Required The string you want manipulated
inputStr.toLowerCase()
Example: XyZzY -> xyzzy
inputStr.toUpperCase()
Example: XyZzY -> XYZZY
inputStr.charAt(0).toUpperCase() + inputStr.slice(1).toLowerCase()
Example: XyZzY -> Xyzzy
name: SomeWorkflow
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- id: string
uses: seatcode/git-cli-actions-seatcode@v1.0
with:
string: XyZzY
- id: step2
run: echo ${{ steps.string.outputs.lowercase }}