Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Workflow Bot -- Update ALL Dependencies (main) #12

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 --->