1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

Check if any changes to commit

This commit is contained in:
Michal Chciński
2022-07-14 15:34:52 +02:00
parent f233b0cab7
commit 45d5ef063b

View File

@@ -38,7 +38,6 @@ jobs:
echo "::set-output name=client::$CLIENT"
git switch -c ${CLIENT}_version_bump_${{ github.event.inputs.version_number }}
git push -u origin ${CLIENT}_version_bump_${{ github.event.inputs.version_number }}
- name: Checkout Version Branch
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
@@ -103,20 +102,36 @@ jobs:
########################
- name: Commit files
env:
CLIENT: ${{ steps.branch.outputs.client }}
- name: Setup git
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Check if version changed
id: version-changed
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "::set-output name=changes_to_commit::TRUE"
else
echo "::set-output name=changes_to_commit::FALSE"
echo "No changes to commit!";
fi
- name: Commit files
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
env:
CLIENT: ${{ steps.branch.outputs.client }}
run: |
git commit -m "Bumped ${CLIENT} version to ${{ github.event.inputs.version_number }}" -a
- name: Push changes
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
env:
CLIENT: ${{ steps.branch.outputs.client }}
run: git push -u origin ${CLIENT}_version_bump_${{ github.event.inputs.version_number }}
- name: Create Bump Version PR
if: ${{ steps.version-changed.outputs.changes_to_commit == 'TRUE' }}
env:
PR_BRANCH: "${{ steps.branch.outputs.client }}_version_bump_${{ github.event.inputs.version_number }}"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"