only publish after tests pass
This commit is contained in:
parent
adf4534816
commit
15258657fc
13
.github/workflows/docker.yml
vendored
13
.github/workflows/docker.yml
vendored
@ -1,13 +0,0 @@
|
|||||||
name: Docker Push
|
|
||||||
on: [push]
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@master
|
|
||||||
- name: Publish to Registry
|
|
||||||
uses: elgohr/Publish-Docker-Github-Action@master
|
|
||||||
with:
|
|
||||||
name: shish2k/shimmie2
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
@ -1,9 +1,9 @@
|
|||||||
name: Unit Tests
|
name: Test & Publish
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
test:
|
||||||
name: PHP ${{ matrix.php }} / DB ${{ matrix.database }}
|
name: PHP ${{ matrix.php }} / DB ${{ matrix.database }}
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 3
|
max-parallel: 3
|
||||||
@ -74,3 +74,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
wget https://scrutinizer-ci.com/ocular.phar
|
wget https://scrutinizer-ci.com/ocular.phar
|
||||||
php ocular.phar code-coverage:upload --format=php-clover data/coverage.clover
|
php ocular.phar code-coverage:upload --format=php-clover data/coverage.clover
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: Publish to Registry
|
||||||
|
uses: elgohr/Publish-Docker-Github-Action@master
|
||||||
|
with:
|
||||||
|
name: shish2k/shimmie2
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
Loading…
x
Reference in New Issue
Block a user