Skip to content

Commit

Permalink
GHA: fix wrong path of diff-result.txt
Browse files Browse the repository at this point in the history
    - Add the detection of changes

Signed-off-by: Vicente Cheng <[email protected]>
(cherry picked from commit 8a314d6)
  • Loading branch information
Vicente-Cheng committed Feb 11, 2025
1 parent 477bdc8 commit d5b51d5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/installer-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
docker pull $BASE_OS_IMAGE
echo "Diff $BASE_OS_IMAGE with ${{ env.IMAGE_NAME }}..."
container-diff diff daemon://docker.io/$BASE_OS_IMAGE daemon://docker.io/${{ env.IMAGE_NAME }} --type=rpm --output=/tmp/diff-result.txt
cat diff-result.txt
cat /tmp/diff-result.txt
- name: Clone harvester-installer repo
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -71,6 +71,10 @@ jobs:
run: |
git config --local --unset http.https://github.com/.extraheader ^AUTHORIZATION:
gh auth setup-git
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit, skip PR creation."
exit 0
fi
git add .
git commit -m "Bump OS ${{ inputs.tag }}" --author="${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
git push origin HEAD:bump-os-${{ inputs.tag }}
Expand Down Expand Up @@ -119,6 +123,10 @@ jobs:
run: |
git config --local --unset http.https://github.com/.extraheader ^AUTHORIZATION:
gh auth setup-git
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit, skip PR creation."
exit 0
fi
git add .
git commit -m "Bump nvidia-driver-toolkit ${{ inputs.tag }}" --author="${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
git push origin HEAD:bump-nv-driver-${{ inputs.tag }}
Expand Down

0 comments on commit d5b51d5

Please sign in to comment.