From 3cfb50b541e1a4294a4614e084b2b15ff82bf0b1 Mon Sep 17 00:00:00 2001 From: zizifn <1803942+zizifn@users.noreply.github.com> Date: Sun, 13 Dec 2020 01:47:35 +0800 Subject: [PATCH] chore: update --- .github/workflows/main.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 48f7087..0adc94f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,12 +9,9 @@ on: description: "deploy/stop/start" default: "deploy" -env: - actions: ${{ github.event.inputs.actions }} - jobs: heroku-deploy: - if: ${{ env.actions == 'deploy' }} + if: ${{ github.event.inputs.actions == 'deploy' || github.event.inputs.actions == ''}} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -33,7 +30,7 @@ jobs: NODE_ENV: production SECRET_KEY: ${{ secrets.MY_SECRET_KEY }} stop: - if: ${{ env.actions == 'start' || env.actions == 'stop' }} + if: ${{ github.event.inputs.actions == 'start' || github.event.inputs.actions == 'stop' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -44,7 +41,8 @@ jobs: heroku_email: ${{secrets.EMAIL}} justlogin: true - run: | - echo ${{ env.actions }} - if [[ ${{ env.actions }} == 'stop' ]]; then echo "stop" && echo "dd"; fi - if [[ ${{ env.actions }} == 'start' ]]; then echo "start" && echo "dd"; fi + echo ${{ github.event.inputs.actions }} + if [[ ${{ github.event.inputs.actions1 }} == '' ]]; then echo "actions1 is empty"; fi + if [[ ${{ github.event.inputs.actions }} == 'stop' ]]; then echo "stop" && echo "dd"; fi + if [[ ${{ github.event.inputs.actions }} == 'start' ]]; then echo "start" && echo "dd"; fi heroku auth:whoami