-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (39 loc) · 1.06 KB
/
ci.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
39
40
41
name: Continuous Integration
on: push
jobs:
run-tests:
name: Run linter and tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- run: docker compose up -d caddy php-fpm knots redis
- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
- run: composer install
- run: php vendor/bin/php-cs-fixer check -v
- run: composer setup
- run: composer test
- if: always()
run: docker compose down -v
build-image:
name: Build Docker image
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
needs:
- run-tests
steps:
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: 1maa
password: ${{ secrets.DOCKER_HUB_PASS }}
- uses: docker/build-push-action@v5
with:
cache-from: type=registry,ref=1maa/bbo-faucet:latest
cache-to: type=inline
context: .
push: true
tags: 1maa/bbo-faucet:latest