Testing values.yaml #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Diff | |
on: | |
pull_request: | |
branches: | |
- "main" | |
paths: | |
- ".github/workflows/generate-diff.yml" | |
- "examples/**" | |
jobs: | |
render-diff: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: pull-request | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
path: main | |
- name: Set ArgoCD Custom Values | |
run: | | |
cat > values.yaml << "EOF" | |
# set whatever helm values you want | |
configs: | |
cm: | |
kustomize.buildOptions: --load-restrictor LoadRestrictionsNone --enable-helm | |
EOF | |
- name: Generate Diff | |
run: | | |
docker build pull-request -f pull-request/Dockerfile_AMD64 -t image | |
docker run \ | |
--network=host \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v $(pwd)/main:/base-branch \ | |
-v $(pwd)/pull-request:/target-branch \ | |
-v $(pwd)/output:/output \ | |
-v $(pwd)/values.yaml:/argocd-config/values.yaml \ | |
-e TARGET_BRANCH=${{ github.head_ref }} \ | |
-e REPO=${{ github.repository }} \ | |
image --debug | |
- name: Post diff as comment | |
run: | | |
gh pr comment ${{ github.event.number }} --repo ${{ github.repository }} --body-file output/diff.md --edit-last || \ | |
gh pr comment ${{ github.event.number }} --repo ${{ github.repository }} --body-file output/diff.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |