https://github.com/streetsidesoftware/actions
Collection of actions for GitHub Workflows
https://github.com/streetsidesoftware/actions
Last synced: 3 months ago
JSON representation
Collection of actions for GitHub Workflows
- Host: GitHub
- URL: https://github.com/streetsidesoftware/actions
- Owner: streetsidesoftware
- License: mit
- Created: 2023-09-04T11:57:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-29T13:16:46.000Z (7 months ago)
- Last Synced: 2024-10-29T16:00:37.197Z (7 months ago)
- Language: JavaScript
- Size: 1.45 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Workflow Actions
Collection of actions for GitHub Workflows
## `summary` Action
Easily add markdown text to a workflow summary.
Example:
```yaml
name: '📗 Example Summary'on:
workflow_dispatch:permissions:
contents: readjobs:
run-example:
runs-on: ubuntu-latest
strategy:
matrix:
version: [10, 12, 14]
steps:
- name: Summary
uses: streetsidesoftware/actions/public/summary@v1
with:
text: |
# Summary
Finished with Node: `${{ matrix.version }}`
```## `output` Action
Set the `output.value` of a step. This is a useful way to keep calculated values.
Example:
````yaml
name: '📗 Example Set Output'on:
workflow_dispatch:permissions:
contents: readjobs:
run-example:
runs-on: ubuntu-latest
strategy:
matrix:
version: [10, 12, 14]
steps:
- name: Test Step Output
id: my_step
uses: streetsidesoftware/actions/public/output@v1
with:
value: |
Action: ${{ github.action }}
Actor: ${{ github.actor }}
Ref: ${{ github.ref }}- name: Detect if Main
id: is_main
uses: streetsidesoftware/actions/public/output@v1
with:
value: ${{ github.ref == 'refs/heads/main' || '' }}- name: Summary
uses: streetsidesoftware/actions/public/summary@v1
with:
text: |
# Summary
Node: `${{ matrix.version }}`
Output:
```
${{ steps.my_step.outputs.value }}
```
Is Main: ${{ steps.is_main.outputs.value }} as bool ${{ !!steps.is_main.outputs.value }}
````## `dirty` Action
Determine if the git tree has changes.
Example:
````yaml
name: '📗 Example Dirty'on:
workflow_dispatch:permissions:
contents: readjobs:
run-example:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4- name: Dirty 1
id: dirty_1
uses: streetsidesoftware/actions/public/dirty@v1- name: Touch
run: |
touch test.txt
echo "\n make dirty \n" >> README.md- name: Dirty 2
id: dirty_2
uses: streetsidesoftware/actions/public/dirty@v1- name: Summary
uses: streetsidesoftware/actions/public/summary@v1
with:
text: |
# Dirty Summary## Dirty 1
isDirty: `${{ steps.dirty_1.outputs.isDirty }}` = ${{ steps.dirty_1.outputs.isDirty && 'Yes' || 'No' }} = ${{ !!steps.dirty_1.outputs.isDirty }}
status:
```
${{ steps.dirty_1.outputs.status }}
```## Dirty 2
isDirty: `${{ steps.dirty_2.outputs.isDirty }}` = ${{ steps.dirty_2.outputs.isDirty && 'Yes' || 'No' }} = ${{ !!steps.dirty_2.outputs.isDirty }}
status:
```
${{ steps.dirty_2.outputs.status }}
```
````