Files
DatBrowser/.gitea/workflows/pushImage.yaml
Matthias Guillitte a162bb2c1f
Some checks failed
Test, build and push image to registry / phpunit-tests (push) Successful in 1m58s
Test, build and push image to registry / build-image (push) Has been cancelled
Fix CI test
2025-11-06 23:32:29 +01:00

37 lines
1.1 KiB
YAML

name: Test, build and push image to registry
on:
push:
jobs:
phpunit-tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3.0'
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest --no-interaction
- name: Run PHPUnit tests
run: vendor/bin/phpunit --configuration phpunit.xml
build-image:
needs: phpunit-tests
if: success() && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: git.matthiasg.dev
username: ninluc
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
run: |
docker build -t git.matthiasg.dev/ninluc/datbrowser:latest .
docker push git.matthiasg.dev/ninluc/datbrowser:latest