Skip to content

Commit

Permalink
ci: Workflow Bot -- Update ALL Dependencies (main) (#12)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason3S <Jason3S@users.noreply.github.com>
  • Loading branch information
1 parent de4ee47 commit c276e0e
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 4 deletions.
54 changes: 54 additions & 0 deletions .github/actions/dirty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,57 @@ Determine if the git tree has changes.
Example:

<!--- @@inject: ../../workflows/example-dirty.yaml --->

````yaml
name: '📗 Example Dirty'

on:
workflow_dispatch:

permissions:
contents: read

jobs:
run-example:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Dirty 1
id: dirty_1
uses: ./.github/actions/dirty

- name: Touch
run: |
touch test.txt
echo "\n make dirty \n" >> README.md
- name: Dirty 2
id: dirty_2
uses: ./.github/actions/dirty

- name: Summary
uses: streetsidesoftware/actions/.github/actions/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 }}
```
````

<!--- @@inject-end: ../../workflows/example-dirty.yaml --->
11 changes: 7 additions & 4 deletions .github/actions/output/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Example:

<!--- @@inject: ../../workflows/example-output.yaml --->

```yaml
````yaml
name: '📗 Example Set Output'

on:
Expand Down Expand Up @@ -42,9 +42,12 @@ jobs:
with:
text: |
# Summary
Node: `${{ matrix.version }}
Output: ${{ steps.my_step.outputs.value }}
Node: `${{ matrix.version }}`
Output:
```
${{ steps.my_step.outputs.value }}
```
Is Main: ${{ steps.is_main.outputs.value }}
```
````

<!--- @@inject-end: ../../workflows/example-output.yaml --->
81 changes: 81 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,85 @@ Collection of actions for GitHub Workflows

<!--- @@inject: .github/actions/summary/README.md --->

## `summary` Action

Easily add markdown text to a workflow summary.

Example:

```yaml
name: '📗 Example Summary'

on:
workflow_dispatch:

permissions:
contents: read

jobs:
run-example:
runs-on: ubuntu-latest
strategy:
matrix:
version: [10, 12, 14]
steps:
- name: Summary
uses: streetsidesoftware/actions/.github/actions/summary@v1
with:
text: |
# Summary
Finished with Node: `${{ matrix.version }}`
```

<!--- @@inject-end: .github/actions/summary/README.md --->

<!--- @@inject: .github/actions/output/README.md --->

## `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: read

jobs:
run-example:
runs-on: ubuntu-latest
strategy:
matrix:
version: [10, 12, 14]
steps:
- name: Test Step Output
id: my_step
uses: streetsidesoftware/actions/.github/actions/output@v1
with:
value: |
Action: ${{ github.action }}
Actor: ${{ github.actor }}
Ref: ${{ github.ref }}
- name: Detect if Main
id: is_main
uses: streetsidesoftware/actions/.github/actions/output@v1
with:
value: ${{ github.ref == 'refs/heads/main' }}

- name: Summary
uses: streetsidesoftware/actions/.github/actions/summary@v1
with:
text: |
# Summary
Node: `${{ matrix.version }}
Output: ${{ steps.my_step.outputs.value }}
Is Main: ${{ steps.is_main.outputs.value }}
```

<!--- @@inject-end: .github/actions/output/README.md --->

0 comments on commit c276e0e

Please sign in to comment.