Compare commits

..

No commits in common. "8485ce2b1f1e7bf0e83f64d8fbdc838baef4c9fe" and "f7b42cb9dd6f663a1da2adcb34cedb4a566eb483" have entirely different histories.

View file

@ -25,6 +25,10 @@ jobs:
ref: main ref: main
path: main path: main
- name: Get changed files
id: changed-files
uses: https://github.com/tj-actions/changed-files@v45
- name: Install Docker CLI - name: Install Docker CLI
run: | run: |
if command -v apt-get &>/dev/null; then if command -v apt-get &>/dev/null; then
@ -35,18 +39,16 @@ jobs:
- name: Generate Diff - name: Generate Diff
run: | run: |
CONTAINER_ID=$(docker inspect --format='{{.Id}}' "$HOSTNAME") mkdir -p $(pwd)/output
docker cp "$CONTAINER_ID:$(pwd)/main" /tmp/argocd-main docker run \
docker cp "$CONTAINER_ID:$(pwd)/pull-request" /tmp/argocd-pr
mkdir -p output
docker run --rm \
--network=host \ --network=host \
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock \
-v /tmp/argocd-main:/base-branch \ -v $(pwd)/main:/base-branch \
-v /tmp/argocd-pr:/target-branch \ -v $(pwd)/pull-request:/target-branch \
-v /tmp/argocd-output:/output \ -v $(pwd)/output:/output \
-e TARGET_BRANCH=refs/pull/$PR_NUMBER/merge \ -e TARGET_BRANCH=refs/pull/$PR_NUMBER/merge \
-e REPO=${{ forge.repository }} \ -e REPO=${{ forge.repository }} \
-e FILES_CHANGED="${{ steps.changed-files.outputs.all_changed_files }}" \
dagandersen/argocd-diff-preview:v0.2.8 dagandersen/argocd-diff-preview:v0.2.8
- name: Add comment - name: Add comment