Skip to content

Commit

Permalink
fix: run publish docker only on tags and debug... (#1428)
Browse files Browse the repository at this point in the history
* fix: run publish docker only on tags and debug...

... pusher email
  • Loading branch information
razvan-pro committed Dec 8, 2020
1 parent e35ef79 commit caa2355
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ on:
pull_request:
jobs:
test:
name: Run JS/Python/Cypress tests
if: ${{ github.event.pusher.email != 'action@github.com' }}
runs-on: ubuntu-18.04
steps:
- name: "[Debug] Print pusher email"
run: echo "${{ github.event.pusher.email }}"
- name: Checkout
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -58,6 +61,7 @@ jobs:
uses: codecov/codecov-action@v1

test-aimmo-game:
name: Test aimmo-game
if: ${{ github.event.pusher.email != 'action@github.com' }}
runs-on: ubuntu-18.04
steps:
Expand All @@ -80,6 +84,7 @@ jobs:
uses: codecov/codecov-action@v1

test-aimmo-game-creator:
name: Test aimmo-game-creator
if: ${{ github.event.pusher.email != 'action@github.com' }}
runs-on: ubuntu-18.04
steps:
Expand All @@ -102,6 +107,7 @@ jobs:
uses: codecov/codecov-action@v1

test-aimmo-game-worker:
name: Test aimmo-game-worker
if: ${{ github.event.pusher.email != 'action@github.com' }}
runs-on: ubuntu-18.04
steps:
Expand All @@ -122,10 +128,11 @@ jobs:
docker cp -a $CONTAINERID:coverage.xml $(pwd)/coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1

publish-python:
name: Publish aimmo PyPi package
needs: [test, test-aimmo-game, test-aimmo-game-creator, test-aimmo-game-worker]
needs:
[test, test-aimmo-game, test-aimmo-game-creator, test-aimmo-game-worker]
if: github.event_name == 'push' && github.event.pusher.email != 'action@github.com'
runs-on: ubuntu-18.04
env:
Expand Down Expand Up @@ -170,8 +177,7 @@ jobs:

publish-docker-images:
name: Publish aimmo Docker images
needs: [test, test-aimmo-game, test-aimmo-game-creator, test-aimmo-game-worker]
if: github.event_name == 'push' && github.event.pusher.email != 'action@github.com'
if: github.event_name == 'push' && github.event.pusher.email == 'action@github.com' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-18.04
steps:
- name: Checkout
Expand Down

0 comments on commit caa2355

Please sign in to comment.