Skip to content

Commit

Permalink
Add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
avidit committed Mar 4, 2024
1 parent 2b229d1 commit 19ae7cb
Show file tree
Hide file tree
Showing 13 changed files with 134 additions and 8 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_size = 2
26 changes: 26 additions & 0 deletions .github/workflows/greeting_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Greeting (Action)

on:
push:
paths:
- actions/greeting/action.yml
- .github/workflows/greeting_action.yml
workflow_dispatch:

jobs:
greeting:
name: Greeting
runs-on: ubuntu-latest
steps:
- name: Greeting
id: greeting
uses: DynamoDS/workflows/actions/greeting@master
with:
message: World
- name: Random number
run: echo "$RANDOM_NUMBER"
shell: bash
env:
RANDOM_NUMBER: ${{ steps.greeting.outputs.number }}
- name: Date
run: date
15 changes: 15 additions & 0 deletions .github/workflows/greeting_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Greeting (Workflow)

on:
push:
paths:
- .github/workflows/greeting.yml
- .github/workflows/greeting_workflow.yml
workflow_dispatch:

jobs:
greeting:
name: Greeting
uses: DynamoDS/workflows/.github/workflows/greeting.yml@master
with:
message: World
30 changes: 30 additions & 0 deletions .github/workflows/msbuild_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: MSBuild (Action)

on:
push:
paths:
- actions/msbuild/action.yml
- .github/workflows/msbuild_action.yml
workflow_dispatch:

jobs:
msbuild:
name: MSBuild
runs-on: windows-latest
steps:
- name: MSBuild
uses: DynamoDS/workflows/actions/msbuild@master
with:
repository: DynamoDS/Dynamo
dotnet_version: 8.0.x
solution_path: src\Dynamo.All.sln
build_configuration: Release
runtime_identifier: win-x64
- name: Look for DynamoCLI.exe
run: |
Write-Output "***Locating DynamoCLI.exe!***"
if (Test-Path -Path "${{ github.workspace }}/bin/AnyCPU/Release/DynamoCLI.exe") {
Write-Output "DynamoCLI.exe exists!"
} else {
Write-Error "DynamoCLI.exe was not found!"
}
20 changes: 20 additions & 0 deletions .github/workflows/msbuild_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: MSBuild (Workflow)

on:
push:
paths:
- .github/workflows/msbuild.yml
- .github/workflows/msbuild_workflow.yml
workflow_dispatch:

jobs:
msbuild:
name: MSBuild
uses: DynamoDS/workflows/.github/workflows/msbuild.yml@master
with:
runner: windows-latest
repository: DynamoDS/Dynamo
dotnet_version: 8.0.x
solution_path: src\Dynamo.All.sln
build_configuration: Release
runtime_identifier: win-x64
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"*.yml": "github-actions-workflow"
}
}
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ Collection of reusable workflows and compostite actions

## Reusable Workflows

- [greeting.yml](./.github/workflows/greeting.yml)
- [msbuild.yml](./.github/workflows/msbuild.yml)
| workflow | description | example workflow | status |
| -- | -- | -- | -- |
| [greeting.yml](https://github.com/DynamoDS/workflows/blob/master/workflows/greeting.yml) | sample workflow | [greeting_workflow.yml](.github/workflows/greeting_workflow.yml) | [![Greeting (Workflow)](https://github.com/DynamoDS/workflows/actions/workflows/greeting_workflow.yml/badge.svg)](https://github.com/DynamoDS/workflows/actions/workflows/greeting_workflow.yml) |
| [msbuild.yml](https://github.com/DynamoDS/workflows/blob/master/workflows/msbuild.yml) | Build a project with msbuild | [msbuild_workflow.yml](.github/workflows/msbuild_workflow.yml) | [![MSBuild (Workflow)](https://github.com/DynamoDS/workflows/actions/workflows/msbuild_workflow.yml/badge.svg)](https://github.com/DynamoDS/workflows/actions/workflows/msbuild_workflow.yml) |

## Composite Actions

- [greeting](./.github/actions/greeting/action.yml)
- [msbuild](./.github/actions/msbuild/action.yml)

Usage:

[DynamoDS/workflow-examples](https://github.com/DynamoDS/workflows-examples)
| action | description | example workflow | status |
| -- | -- | -- | -- |
| [greeting.yml](https://github.com/DynamoDS/workflows/blob/master/.github/actions/greetion/action.yml) | sample workflow | [greeting_action.yml](.github/workflows/greeting_actions.yml) | [![Greeting (Action)](https://github.com/DynamoDS/workflows/actions/workflows/greeting_action.yml/badge.svg)](https://github.com/DynamoDS/workflows/actions/workflows/greeting_action.yml) |
| [msbuild.yml](https://github.com/DynamoDS/workflows/blob/master/.github/actions/msbuild/action.yml) | Build a project with msbuild | [msbuild_action.yml](.github/workflows/msbuild_action.yml) | [![MSBuild (Action)](https://github.com/DynamoDS/workflows/actions/workflows/msbuild_action.yml/badge.svg)](https://github.com/DynamoDS/workflows/actions/workflows/msbuild_action.yml) |

More info:

Expand Down
4 changes: 4 additions & 0 deletions actions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Composite Actions

- [greeting](./greeting)
- [msbuild](./msbuild)
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Reusable Workflows

> [!IMPORTANT]
> Reusable Workflow files must be placed in .github/workflows folder. See: [Calling a reusable workflow](https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow)
Files here are symlinks to the files in [.github/workflows](./.github/workflows) folder

- [greeting](greeting.yml)
- [msbuild](msbuild.yml)
1 change: 1 addition & 0 deletions workflows/greeting.yml
1 change: 1 addition & 0 deletions workflows/msbuild.yml

0 comments on commit 19ae7cb

Please sign in to comment.