diff --git a/.github/workflows/dotnetcore-2.yml b/.github/workflows/dotnetcore-2.yml index 9eac95f..2f25869 100644 --- a/.github/workflows/dotnetcore-2.yml +++ b/.github/workflows/dotnetcore-2.yml @@ -1,15 +1,14 @@ name: .NET Core CI 2 - on: - push: - branches: [ master ] - pull_request: - branches: [ master ] + repository_dispatch: + types: [matrix-ci] jobs: build: - - runs-on: ubuntu-latest + runs-on: ${{ matrix.image }} + strategy: + matrix: + image: ${{ github.event.client_payload.images }} steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index a02d08d..46daa70 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -1,5 +1,7 @@ name: .NET Core. CI 1 +foo: test + on: push: branches: [ master ] @@ -8,7 +10,6 @@ on: jobs: build: - runs-on: ${{ matrix.image }} strategy: matrix: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..480b8a1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + release: + types: + - published + - prereleased + - released + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + + # Runs a single command using the runners shell + - name: Release even type ${{ github.event.action }} + run: echo $payload + env: + payload: ${{ toJson(github.event) }} diff --git a/.github/workflows/trigger-event.yml b/.github/workflows/trigger-event.yml new file mode 100644 index 0000000..fcbef5d --- /dev/null +++ b/.github/workflows/trigger-event.yml @@ -0,0 +1,27 @@ +# This is a basic workflow to help you get started with Actions + +name: repo-dispatch + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + trigger: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.REPO_ACCESS_TOKEN }} + event-type: 'matrix-ci' + client-payload: '{"images": [ "ubuntu-latest", "windows-latest" ] }' diff --git a/README.md b/README.md index cd676e5..0f63aca 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,4 @@ New content for the readme More edits +adsfasdfadsf diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml index d6289dd..23014bf 100644 --- a/azure-pipelines-1.yml +++ b/azure-pipelines-1.yml @@ -1,4 +1,5 @@ # ASP.NET Core + # Build and test ASP.NET Core projects targeting .NET Core. # Add steps that run tests, create a NuGet package, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core @@ -13,5 +14,17 @@ variables: buildConfiguration: 'Release' steps: -- script: dotnet build --configuration $(buildConfiguration) - displayName: 'dotnet build $(buildConfiguration)' +- task: AzurePowerShell@5 + inputs: + azureSubscription: 'azure-pipeline-pm(5e811388-da36-4a22-b49b-e3477f384ec3)' + ScriptType: 'InlineScript' + Inline: | + gci env:\ + azurePowerShellVersion: 'LatestVersion' +- task: AzureCLI@2 + inputs: + azureSubscription: 'azure-pipeline-pm(5e811388-da36-4a22-b49b-e3477f384ec3)' + scriptType: 'bash' + scriptLocation: 'inlineScript' + inlineScript: 'env' +