From 0e1ddc7f26458ab14eb7d9ddd47dde35c3ffe719 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Tue, 16 Jul 2024 16:57:11 +0100 Subject: [PATCH] Update triggers (#2183) Trying to get this workflow to trigger properly for both main, and for other branches. Currently only trigers automatically for PRs. --- .github/workflows/code-review.yml | 7 ++++++- .github/workflows/main.yml | 26 ++++---------------------- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index a03544cd2..e49834851 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -12,10 +12,15 @@ jobs: code-review: runs-on: ubuntu-latest steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ env.APP_ID }} + private-key: ${{ env.PRIVATE_KEY }} - uses: fitomad/github-chatgpt-integration@main with: openai-api-key: ${{ secrets.OPENAI_API_KEY }} - github-token: ${{ secrets.GH_TOKEN }} + github-token: ${{ steps.app-token.outputs.token }} github-pr-id: ${{ github.event.number }} dev-lang: c# openai-max-tokens: 4096 \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index be1466f33..037896471 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,8 +7,9 @@ permissions: on: push: branches: - tags-ignore: - - 'v*-*' + - "*" + tags: + - '!v*-*' pull_request: branches: - main @@ -214,25 +215,6 @@ jobs: name: AzureDevOpsMigrationTools-Packages path: ./staging/** - # Code Review - code-review: - name: "Code Review Bot " - runs-on: ubuntu-latest - needs: [Setup] - steps: - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app-id: ${{ env.APP_ID }} - private-key: ${{ env.PRIVATE_KEY }} - - uses: fitomad/github-chatgpt-integration@main - with: - openai-api-key: ${{ secrets.OPENAI_API_KEY }} - github-token: ${{ steps.app-token.outputs.token }} - github-pr-id: ${{ github.event.number }} - dev-lang: c# - openai-max-tokens: 4096 - # Build Docs BuildDocs: name: "Build Documentation output" @@ -381,7 +363,7 @@ jobs: # Release to Winget WingetRelease: name: "Release to Winget" - runs-on: ubuntu-latest + runs-on: windows-latest needs: [Setup, GitHubRelease] if: ${{ success() && ( needs.Setup.outputs.nkdAgility_Ring != 'Canary' ) && (needs.Setup.outputs.HasChanged_src) }} steps: