Skip to content

Commit

Permalink
teste reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-machado committed Apr 19, 2024
1 parent 791da3b commit e302c19
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Main workflow

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
call-workflow:
uses: ./.github/workflows/reusable.yml
with:
dotnetVersions: '["6.0", "8.0"]'
21 changes: 21 additions & 0 deletions .github/workflows/reusable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Matrix from Input Example
on:
workflow_call:
inputs:
dotnetVersions:
type: string
default: '["3.1", "5.0", "6.0"]'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: ${{fromJson(github.event.inputs.dotnetVersions)}}
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Build
run: dotnet build --configuration Release

0 comments on commit e302c19

Please sign in to comment.