I have a problem in my Github workflow. I want to trigger the "test" workflow at the end of the "nuget" workflow. But it doesn't work.
In the test file, there is the run on workflow event, but is not triggered.
Here are my files :
nuget.yml :
name: nuget
on:
workflow_dispatch:
push:
branches: "**"
pull_request:
branches: "**"
jobs:
get_nuget:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: nuget/setup-nuget@v1
with:
nuget-version: 'latest'
- uses: actions/cache@v1
id: cache
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
- name: NuGet Restore
if: steps.cache.outputs.cache-hit != 'true'
run: nuget restore gremy.ovh.sln --no-restore
test.yml
name: test
on:
workflow_run:
workflows: [nuget]
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore --locked-mode
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal