-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (30 loc) · 1.01 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Build
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Install dependencies
run: composer install --no-scripts --no-interaction --prefer-dist
- name: Pest
run: vendor/bin/pest --compact
- name: Build application
run: php class-dependencies-analyzer app:build
- name: Commit and Push changes
env:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add -A
git commit -m "Build dependencies for tag $GITHUB_REF" || echo "No changes to commit"
git push https://[email protected]/DeGraciaMathieu/php-class-dependencies-analyzer.git HEAD:refs/heads/main || echo "No changes to push"