for example 1 : need time and date in your timezone, localized terminal outputs, sort files or values alfabeticaly...
- uses: milankomaj/shell-x@v0.3
with: | required | default 2 | optional |
---|---|---|---|
actor: | false | ${{ github.actor }} |
✅ |
shell: | false | 3 | ✅ |
locale: | false | 3 | ✅ |
timezone: | false | 3 | ✅ |
comand: 4 | false | ✅ |
os:⬇️ shell:➡️ | bash | sh | pwsh | cmd | powershell | custom |
---|---|---|---|---|---|---|
ubuntu | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
windows | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ |
macos | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
- uses: milankomaj/shell-x@v0.3
- uses: milankomaj/shell-x@v0.3
with:
shell: pwsh
locale: sk_SK
timezone: Central Europe Standard Time
comand: Get-TimeZone && Get-Date -UFormat '%A %d/%m/%Y %R %Z'
- uses: milankomaj/shell-x@v0.3
with:
shell: bash
locale: sk_SK.utf8
timezone: Europe/Bratislava
comand: cat /etc/timezone && date
name: test
run-name: ${{ github.workflow }} ✅ ${{ github.actor }} ✅ ${{ github.event_name}}
on:
workflow_dispatch:
jobs:
Shell:
name: Shell
continue-on-error: false
strategy:
max-parallel: 3
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: shell-x@v0.3
id: TEST
uses: milankomaj/shell-x@v0.3
with:
shell: bash
locale: sk_SK.utf8
timezone: Europe/Bratislava
comand: date && timedatectl
# optional shell-x outputs
- name: inputs-outputs
run: echo "::notice::${{ steps.TEST.outputs.inputs-outputs }}"
- name: shell-outputs
run: echo "::notice::${{ steps.TEST.outputs.shell-outputs}}"
- name: comand-outputs
run: ${{ steps.TEST.outputs.comand-outputs }} && sudo apt -y update && sudo apt -y upgrade