Skip to content

Commit

Permalink
Update triggers (#2183)
Browse files Browse the repository at this point in the history
Trying to get this workflow to trigger properly for both main, and for
other branches. Currently only trigers automatically for PRs.
  • Loading branch information
MrHinsh authored Jul 16, 2024
1 parent f6de7a9 commit 0e1ddc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 23 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
26 changes: 4 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ permissions:
on:
push:
branches:
tags-ignore:
- 'v*-*'
- "*"
tags:
- '!v*-*'
pull_request:
branches:
- main
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 0e1ddc7

Please sign in to comment.