Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(actions): add github action to validate and diff pull request #86

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: pull-request-validation

on:
pull_request:
branches:
- main
- feature/pr-action

jobs:
build_lint_validate_diff:
name: lint, validate and diff from main
permissions: write-all
runs-on: ubuntu-latest
container:
image: alpine/helm:3.14.3
steps:
- name: checkout pr head
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: install chart dependencies
run: helm dependency build charts/immich

- name: lint helm chart
run: helm lint charts/immich --set immich.persistence.library.existingClaim=test-pvc

- name: prepare
run: mkdir -p charts/immich/build
- name: create full manifest from pr head
run: helm template immich charts/immich --set immich.persistence.library.existingClaim=test-pvc > charts/immich/build/manifest.yaml

- name: checkout main
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
path: main

- name: install chart dependencies
run: helm dependency build main/charts/immich

- name: prepare
run: mkdir -p main/charts/immich/build
- name: create full manifest from main
run: helm template immich main/charts/immich --set immich.persistence.library.existingClaim=test-pvc > main/charts/immich/build/manifest.yaml

- name: create diff comment
uses: int128/diff-action@v1
with:
base: main/charts/immich/build
head: charts/immich/build
comment-header: "## Changes in Final Manifest"