Skip to content

Commit

Permalink
ci: fix helm diff in case of forks (#15818)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcjack authored Jan 21, 2025
1 parent 9c03e29 commit 0dc9d67
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/helm-diff-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ name: Helm Loki Diff CI
on:
pull_request:
paths:
- 'production/helm/loki/**'
- "production/helm/loki/**"

# These permissions are needed to assume roles from Github's OIDC.
permissions:
contents: read
pull-requests: write
Expand Down Expand Up @@ -273,6 +274,7 @@ jobs:
summary-diff-outputs:
name: Summary Diffs
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.fork == false
needs:
- single-binary-diff
- default-values-diff
Expand All @@ -283,6 +285,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false

- uses: actions/download-artifact@v4
with:
Expand Down
6 changes: 6 additions & 0 deletions production/helm/loki/scenarios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,9 @@ As the last step you need to run a diff between both files:
```shell
diff current-manifest.yaml release-manifest.yaml
```

### Known Issues

* The Github Action won't be able to post the diff comment if the PR is coming from a fork, because of permissions the workflow run from a fork is not able to write in the PR content.

In this case, to review the output we recommend to download the artifacts in the workflow run and check the outputs.
Binary file removed production/helm/loki/scenarios/images/added.png
Binary file not shown.
Binary file removed production/helm/loki/scenarios/images/img.png
Binary file not shown.
Binary file removed production/helm/loki/scenarios/images/modified.png
Binary file not shown.
Binary file removed production/helm/loki/scenarios/images/removed.png
Binary file not shown.

0 comments on commit 0dc9d67

Please sign in to comment.