attribute-spass/.forgejo/workflows/push.yml

33 lines
1 KiB
YAML
Raw Normal View History

2023-10-16 16:43:01 +00:00
on: [push]
jobs:
2023-10-16 17:35:29 +00:00
ls:
runs-on: ubuntu-latest
2023-10-16 18:08:28 +00:00
container:
2023-11-29 18:34:36 +00:00
image: git.php.fail/lubiana/container/php:8.3.0-node-20231212
2023-10-16 17:03:17 +00:00
steps:
2023-10-16 19:51:55 +00:00
- uses: actions/checkout@v3
2023-10-17 18:43:29 +00:00
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
2023-10-18 15:53:01 +00:00
- uses: actions/cache@v3
2023-10-17 18:54:50 +00:00
id: restore-cache
2023-10-17 18:43:29 +00:00
with:
path: ${{ steps.composer-cache.outputs.dir }}
2023-10-17 18:54:50 +00:00
key: composer-cache
2023-10-16 19:49:56 +00:00
- run: composer install
2023-10-16 19:55:59 +00:00
- run: composer fix
2023-10-16 19:59:20 +00:00
- name: GIT commit and push all changed files
env:
2023-10-20 17:57:46 +00:00
CI_COMMIT_MESSAGE: Continuous Integration Fixes
2023-10-16 19:59:20 +00:00
CI_COMMIT_AUTHOR: Continuous Integration
run: |
2023-10-20 16:15:38 +00:00
if [[ -n "$(git status -s)" ]]; then
2023-10-20 17:57:46 +00:00
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "gitbot@users.noreply.php.fail"
git commit -am "${{ env.CI_COMMIT_MESSAGE }}"
git push
2023-10-16 20:07:41 +00:00
fi
2023-10-16 19:59:20 +00:00
2023-10-16 18:23:35 +00:00