From 4d1ba5f9e79e1c2acffff07a703fb49f5292608b Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 13 Dec 2021 01:04:47 +0000 Subject: [PATCH] try splitting test and publish --- .github/workflows/publish.yml | 25 +++++++++++++++++++ .../{test_and_publish.yml => tests.yml} | 18 +------------ 2 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/publish.yml rename .github/workflows/{test_and_publish.yml => tests.yml} (85%) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..7afa3c1b --- /dev/null +++ b/.github/workflows/publish.yml @@ -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" diff --git a/.github/workflows/test_and_publish.yml b/.github/workflows/tests.yml similarity index 85% rename from .github/workflows/test_and_publish.yml rename to .github/workflows/tests.yml index d8d8f4c3..3f9f0889 100644 --- a/.github/workflows/test_and_publish.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: Test & Publish +name: Tests on: push: @@ -110,19 +110,3 @@ jobs: run: | wget https://scrutinizer-ci.com/ocular.phar 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"