From 5f605dce1c680262c1105c3535b801a66d58962c Mon Sep 17 00:00:00 2001 From: Alexandre Machado Date: Fri, 19 Apr 2024 01:16:00 -0300 Subject: [PATCH] teste reusable workflow --- .github/workflows/main.yml | 15 +++++++++++++++ .github/workflows/reusable.yml | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/reusable.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..10c6df6 --- /dev/null +++ b/.github/workflows/main.yml @@ -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"]' \ No newline at end of file diff --git a/.github/workflows/reusable.yml b/.github/workflows/reusable.yml new file mode 100644 index 0000000..9ec284b --- /dev/null +++ b/.github/workflows/reusable.yml @@ -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