try splitting test and publish

This commit is contained in:
Shish 2021-12-13 01:04:47 +00:00
parent bed0db40d7
commit 4d1ba5f9e7
2 changed files with 26 additions and 17 deletions

25
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: DockerHub
on:
workflow_run:
workflows: Tests
branches: master
types: completed
workflow_dispatch:
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
needs: [format, test]
if: ${{ github.event.workflow_run.conclusion == 'success' }}
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 }}
cache: ${{ github.event_name != 'schedule' }}
buildoptions: "--build-arg RUN_TESTS=false"

View File

@ -1,4 +1,4 @@
name: Test & Publish name: Tests
on: on:
push: push:
@ -110,19 +110,3 @@ 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:
name: Publish
runs-on: ubuntu-latest
needs: [format, test]
if: github.event_name == 'push' && 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 }}
cache: ${{ github.event_name != 'schedule' }}
buildoptions: "--build-arg RUN_TESTS=false"