Skip to content

Commit 69582a4

Browse files
committed
more simplify workflow
1 parent e7875dd commit 69582a4

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
if: env.IMAGE_CHANGED == 'true'
6161
run: |
6262
pip install matplotlib
63-
fits2bitmap --stretch asinh --percent 99 -o reference/RomanWAS_new/images/truth/Roman_WAS_truth_J129_12909_4.png reference/RomanWAS_new/images/truth/Roman_WAS_truth_J129_12909_4.fits.gz
63+
fits2bitmap --stretch asinh --percent 99 -o reference/RomanWAS_new/images/truth/Roman_WAS_truth_J129_12909_4.png reference/RomanWAS_new/images/truth/Roman_WAS_truth_J129_12909_4.fits.gz
6464
6565
- name: Overwrite reference with new image
6666
if: env.IMAGE_CHANGED == 'true'
@@ -76,9 +76,11 @@ jobs:
7676
mv -v output/RomanWAS_new/truth/Roman_WAS_index_J129_12909_4.txt reference/RomanWAS_new/truth/Roman_WAS_index_J129_12909_4.txt
7777
fi
7878
79-
echo "reference/ is changed; pushing updates"
80-
git add reference
81-
git commit -m "Update reference"
82-
git checkout ${BRANCH_NAME}
83-
git pull --rebase
84-
git push origin HEAD:${BRANCH_NAME}
79+
if git diff --exit-code; then
80+
echo "reference/ is unchanged; no action needed"
81+
else
82+
echo "reference/ is changed; pushing updates"
83+
git add reference
84+
git commit -m "Update reference"
85+
git push
86+
fi

0 commit comments

Comments
 (0)