Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/milankomaj/shell-x
Localized github runners.
https://github.com/milankomaj/shell-x
action composite-action composite-builds
Last synced: about 1 month ago
JSON representation
Localized github runners.
- Host: GitHub
- URL: https://github.com/milankomaj/shell-x
- Owner: milankomaj
- License: mit
- Created: 2022-10-24T10:08:16.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-14T14:44:52.000Z (4 months ago)
- Last Synced: 2024-08-15T12:39:40.701Z (4 months ago)
- Topics: action, composite-action, composite-builds
- Homepage:
- Size: 739 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shell-x
##### for example [^note] : need time and date in your timezone, localized terminal outputs, sort files or values alfabeticaly...
> #### Composite action for localized github runners.
> ``` - uses: milankomaj/[email protected] ```**with:** | *required* | *default* [^1] | *optional*
---: | :---: | :---: | :---:
actor: | false | `${{ github.actor }}` | ✅
shell: | false | [^2] | ✅
locale: | false | [^2] | ✅
timezone: | false | [^2] | ✅
comand: [^3] | false | | ✅os:⬇️ shell:➡️| *bash* | *sh* | *pwsh* | *cmd* | *powershell*| *custom*
:--- | :---: | :---: | :---: | :---: | :---: | :---:
**ubuntu** | ✅ | ✅ | ✅ | ❌ | ❌ | ✅
**windows**| ✅ | ❌ | ✅ | ✅ | ✅ | ✅
**macos** | ✅ | ✅ | ✅ | ❌ | ❌ | ✅> ##### [shells :link:](https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell)
---
> ###### minimal example
```YAML
- uses: milankomaj/[email protected]
```> ###### example for [windows-latest]
```YAML
- uses: milankomaj/[email protected]
with:
shell: pwsh
locale: sk_SK
timezone: Central Europe Standard Time
comand: Get-TimeZone && Get-Date -UFormat '%A %d/%m/%Y %R %Z'
```> ###### example for [ubuntu-latest]
```YAML
- uses: milankomaj/[email protected]
with:
shell: bash
locale: sk_SK.utf8
timezone: Europe/Bratislava
comand: cat /etc/timezone && date
```> ###### example full workflow [ubuntu-latest]
```YAML
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: [email protected]
id: TEST
uses: milankomaj/[email protected]
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
```---
[^note]: options depend on the runner.os, shell ...
[^1]: if aren't set
[^2]: default Github runners and workflow syntax
[^3]: run any supported command inside shell-x
[^3]: run command inside shell-x