Skip to content

Commit

Permalink
Fix 🤡 conditions in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
glaserL committed Jan 12, 2022
1 parent b0464cd commit ec545c6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,32 @@ on:
description: Publish backend of main HEAD

jobs:

backend:
name: Publish backend
if: ${{ github.event.inputs.backend }}
runs-on: ubuntu-latest
steps:
- name: Get artifact
uses: dawidd6/action-download-artifact@v2 # version from GitHub disallows sharing between workflows
if: ${{ github.event.inputs.backend == 'true' }}
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: build_and_test.yml
path: dist
commit: ${{ github.sha }}
name: backend-${{ github.sha }}
- name: Publish on PyPi
if: ${{ github.event.inputs.backend == 'true' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_BACKEND_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
frontend:
name: Publish frontend
if: ${{ github.event.inputs.frontend }}
runs-on: ubuntu-latest
steps:
- name: Get artifact
if: ${{ github.event.inputs.frontend == 'true' }}
uses: dawidd6/action-download-artifact@v2 # version from GitHub disallows sharing between workflows
with:
github_token: ${{secrets.GITHUB_TOKEN}}
Expand All @@ -46,15 +47,15 @@ jobs:
commit: ${{ github.sha }}
name: frontend-${{ github.sha }}
- name: Publish on PyPi
if: ${{ github.event.inputs.frontend == 'true' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_DASH_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
wrapper:
needs: [ frontend, backend ]
name: Publish container
if: ${{ github.event.inputs.frontend ||github.event.inputs.backend }}
if: ${{ github.event.inputs.frontend == 'true' || github.event.inputs.backend == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checking out repository
Expand Down

0 comments on commit ec545c6

Please sign in to comment.