Skip to content

Commit

Permalink
Commit only lock file
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Dec 20, 2022
1 parent 25f8bde commit 0d3c289
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update composer.lock
name: Update composer deps

on:
push:
Expand All @@ -15,17 +15,23 @@ env:
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}

jobs:
update-composer-lock:
update-composer-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Update lock file
- name: Install dependencies
uses: php-actions/composer@v6
- name: Commit changes
run: |
git config --global user.name "${GIT_USER_EMAIL}"
git config --global user.email "${GIT_USER_EMAIL}"
git commit -am "Update composer.lock file"
git push
git config --global user.email "${GIT_USER_EMAIL}"
if [[! $(git diff --exit-code composer.lock) ]]; then
git commit -m "Update composer dependencies" composer.lock
git push
else
echo "No changes detected"
fi

0 comments on commit 0d3c289

Please sign in to comment.