diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 94fba71..0522443 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,23 +18,18 @@ on: default: "" jobs: - # jobenv: - # runs-on: ubuntu-latest - # environment: ${{ github.event.inputs.env }} - # env: # Or as an environment variable - # APP_NAME: ${{ secrets.APP_NAME }} - # outputs: - # actions: ${{ github.event.inputs.actions || 'deploy'}} - # herokuAppName: ${{ github.event.inputs.heroku-app-name }} - # test111: ${{ github.event.inputs.env }} # todo - # steps: - # - id: herokuAppName # TODO check atcion doc for usage - # # if: ${{ github.event.inputs.actions == 'start'}} - # # run: echo "::set-output name=name::${{ github.event.inputs.heroku-app-name || secrets.APP_NAME }}" - # run: echo ::set-output name=name::${{ github.event.inputs.heroku-app-name }} - # - id: isDeployHeroku # TODO check atcion doc for usage - # # if: ${{ github.event.inputs.actions == 'start'}} - # run: echo "::set-output name=action::false" + jobenv: + runs-on: ubuntu-latest + environment: ${{ github.event.inputs.env }} + env: # Or as an environment variable + APP_NAME: ${{ secrets.APP_NAME }} + outputs: + actions: ${{ github.event.inputs.actions || 'deploy'}} + test111: ${{ github.event.inputs.env }} # todo + steps: + - id: isDeployHeroku # TODO check atcion doc for usage + # if: ${{ github.event.inputs.actions == 'start'}} + run: echo "::set-output name=action::false" # output-jobenv: # runs-on: ubuntu-latest # needs: jobenv @@ -47,6 +42,7 @@ jobs: heroku-deploy: + needs: jobenv if: ${{ needs.jobenv.outputs.actions == 'deploy' || needs.jobenv.outputs.actions == ''}} runs-on: ubuntu-latest environment: ${{ github.event.inputs.env }} @@ -70,6 +66,7 @@ jobs: NODE_ENV: production SECRET_KEY: ${{ secrets.MY_SECRET_KEY }} stop-start-destroy: + needs: jobenv if: ${{ needs.jobenv.outputs.actions == 'start' || needs.jobenv.outputs.actions == 'stop' || needs.jobenv.outputs.actions == 'destroy' }} runs-on: ubuntu-latest environment: ${{ github.event.inputs.env }}