Skip to content

Commit

Permalink
Merge pull request #793 from asuc-octo/feat/helm-diff-master-ver
Browse files Browse the repository at this point in the history
(core) helm diff yaml comment invocation
  • Loading branch information
adit-bala authored Feb 23, 2025
2 parents 7c553a3 + 7fcfe7a commit 8845cda
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/helm-diff.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
name: Generate Helm Diffs for PR

on:
workflow_dispatch:
inputs:
pr_number:
description: 'PR number to generate diff for'
required: true
type: string
issue_comment:
types: [created]

jobs:
helm-diff:
if: |
github.event_name == 'workflow_dispatch' ||
(github.event.issue.pull_request && contains(github.event.comment.body, '/helm-diff'))
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/helm-diff') }}
runs-on: ubuntu-latest
steps:
- name: Checkout PR Code
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event_name == 'workflow_dispatch' ? inputs.pr_number : github.event.issue.number }}/head
ref: refs/pull/${{ github.event.issue.number }}/head

- name: Set up Helm
uses: azure/setup-helm@v1
Expand Down Expand Up @@ -155,9 +147,8 @@ jobs:
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: Number(process.env.PR_NUMBER),
issue_number: ${{ github.event.issue.number }},
body: process.env.DIFF
});
env:
PR_NUMBER: ${{ inputs.pr_number }}
DIFF: ${{ steps.generate-diff.outputs.diff }}

0 comments on commit 8845cda

Please sign in to comment.