futtern/.forgejo/workflows/push.yml

41 lines
1.3 KiB
YAML
Raw Normal View History

2024-06-10 17:16:55 +00:00
on:
push:
branches:
- 'main'
jobs:
ls:
runs-on: docker
container:
2024-12-18 13:30:24 +00:00
image: git.php.fail/lubiana/container/php:8.4.1-ci
2024-06-10 17:16:55 +00:00
steps:
- name: Manually checkout
env:
REPO: '${{ github.repository }}'
TOKEN: '${{ secrets.GITHUB_TOKEN }}'
BRANCH: '${{ env.GITHUB_REF_NAME }}'
2024-09-23 17:09:18 +00:00
GIT_SERVER: 'git.hannover.ccc.de'
2024-06-10 17:16:55 +00:00
run: |
git clone --branch $GITHUB_REF_NAME https://${TOKEN}@${GIT_SERVER}/${REPO}.git .
git fetch
git checkout ${{ github.head_ref }}
- name: composer install
env:
COMPOSER_CACHE_DIR: /opt/hostedtoolcache/.composer/cache/files
run: |
mkdir -p ${{ env.COMPOSER_CACHE_DIR }}
composer install
- name: lint
run: composer lint
- name: test
2024-09-15 20:11:42 +00:00
run: composer mutation
2024-06-10 17:16:55 +00:00
- name: GIT commit and push all changed files
env:
CI_COMMIT_MESSAGE: Continuous Integration Fixes
CI_COMMIT_AUTHOR: Continuous Integration
run: |
if [[ -n "$(git status -s)" ]]; then
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
fi