File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Backend CI
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+
8+ jobs :
9+ build-test :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v4
15+
16+ - name : Setup PHP
17+ uses : shivammathur/setup-php@v2
18+ with :
19+ php-version : ' 8.4'
20+ extensions : mbstring, pdo_mysql
21+
22+ - name : Install Composer dependencies
23+ run : composer install --prefer-dist --no-progress --no-interaction
24+
25+ - name : Run tests
26+ run : php artisan test --without-tty
27+
28+ - name : Build Docker image
29+ run : docker build -t ghcr.io/${{ github.repository }}:latest .
30+
31+ - name : Login to GitHub Container Registry
32+ uses : docker/login-action@v3
33+ with :
34+ registry : ghcr.io
35+ username : ${{ github.actor }}
36+ password : ${{ secrets.GITHUB_TOKEN }}
37+
38+ - name : Push image
39+ run : docker push ghcr.io/${{ github.repository }}:latest
You can’t perform that action at this time.
0 commit comments