diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index 4947c19a..00000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -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 }} diff --git a/.github/workflows/tests.yml b/.github/workflows/test_and_publish.yml similarity index 86% rename from .github/workflows/tests.yml rename to .github/workflows/test_and_publish.yml index 12be62d6..e4be387e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/test_and_publish.yml @@ -1,9 +1,9 @@ -name: Unit Tests +name: Test & Publish on: [push, pull_request] jobs: - build: + test: name: PHP ${{ matrix.php }} / DB ${{ matrix.database }} strategy: max-parallel: 3 @@ -74,3 +74,15 @@ jobs: run: | wget https://scrutinizer-ci.com/ocular.phar 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 }}