print-diff
convert-to-yml / develop-branch (push) Successful in 30s Details

This commit is contained in:
giles 2023-10-23 09:39:37 +01:00
parent be63a2e037
commit d3ef63acfd
1 changed files with 13 additions and 1 deletions

View File

@ -28,7 +28,7 @@ jobs:
firstString=${{ github.ref_name }} firstString=${{ github.ref_name }}
secondString="develop" secondString="develop"
echo ::set-env name=DEVELOPMENT_BRANCH::${firstString/build\//"$secondString"\/} echo ::set-env name=DEVELOPMENT_BRANCH::${firstString/build\//"$secondString"\/}
- name: GIT diff - name: commit
env: env:
CI_COMMIT_MESSAGE: converted to yml for review. CI_COMMIT_MESSAGE: converted to yml for review.
CI_COMMIT_AUTHOR: Continuous Integration CI_COMMIT_AUTHOR: Continuous Integration
@ -37,6 +37,18 @@ jobs:
git config --global user.email "username@users.noreply.github.com" git config --global user.email "username@users.noreply.github.com"
git add -A git add -A
git commit -a -m "${{ github.ref_name }} -> ${{ env.DEVELOPMENT_BRANCH }}" git commit -a -m "${{ github.ref_name }} -> ${{ env.DEVELOPMENT_BRANCH }}"
- name: diff
env:
CI_COMMIT_MESSAGE: converted to yml for review.
CI_COMMIT_AUTHOR: Continuous Integration
run: git diff HEAD origin/${{ env.DEVELOPMENT_BRANCH }}
- name: push
env:
CI_COMMIT_MESSAGE: converted to yml for review.
CI_COMMIT_AUTHOR: Continuous Integration
run: |
if $(git diff HEAD origin/${{ env.DEVELOPMENT_BRANCH }}); then if $(git diff HEAD origin/${{ env.DEVELOPMENT_BRANCH }}); then
git push HEAD origin/${{ env.DEVELOPMENT_BRANCH }}; git push HEAD origin/${{ env.DEVELOPMENT_BRANCH }};
else
echo 'no diff'
fi fi