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 5f605dc
Show file tree
Hide file tree
Showing 2 changed files with 37 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@main
with:
dotnetVersions: '["6.0", "8.0"]'
22 changes: 22 additions & 0 deletions .github/workflows/reusable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Matrix from Input Example
on:
workflow_dispatch:
inputs:
dotnetVersions:
description: 'Versions of .NET to test against'
required: true
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 5f605dc

Please sign in to comment.