From 05d1b3a96a52c9b8cf1ee89c628afc3603e30727 Mon Sep 17 00:00:00 2001 From: yaolin-0 <78028446+yaolin-0@users.noreply.github.com> Date: Thu, 7 Oct 2021 18:21:36 +0800 Subject: [PATCH 1/4] Update main.yml Support environment --- .github/workflows/main.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 306e0c6..08855c0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,17 +2,19 @@ name: heroku-deploy-stop-start on: workflow_dispatch: - branches: - - main inputs: actions: - description: "deploy/stop/start" + description: "action: deploy/stop/start" default: "deploy" + env: + description: "environment: " + default: "" jobs: heroku-deploy: if: ${{ github.event.inputs.actions == 'deploy' || github.event.inputs.actions == ''}} runs-on: ubuntu-latest + environment: ${{ github.event.inputs.env }} steps: - uses: actions/checkout@v2 - uses: akhileshns/heroku-deploy@v3.6.8 # This is the action From 872f103ef827f34123de76a9cf9d940b60c2e58c Mon Sep 17 00:00:00 2001 From: yaolin-0 <78028446+yaolin-0@users.noreply.github.com> Date: Thu, 7 Oct 2021 18:27:01 +0800 Subject: [PATCH 2/4] Update main.yml add log --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 08855c0..27e7765 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,6 +30,8 @@ jobs: HD_UUID: ${{ secrets.HEROKU_V2RAY_UUID }} # UUID for v2ray user, 为了安全,一定要放入github action token中 NODE_ENV: production SECRET_KEY: ${{ secrets.MY_SECRET_KEY }} + - run: | + echo APP_NAME is ${{secrets.APP_NAME}} stop-start: if: ${{ github.event.inputs.actions == 'start' || github.event.inputs.actions == 'stop' }} runs-on: ubuntu-latest From 485c1be46a8f0ccb1096b7ac3ba5d35ae32715e2 Mon Sep 17 00:00:00 2001 From: yaolin-0 <78028446+yaolin-0@users.noreply.github.com> Date: Thu, 7 Oct 2021 18:31:57 +0800 Subject: [PATCH 3/4] Update main.yml add log --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 27e7765..03175f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,6 +16,7 @@ jobs: runs-on: ubuntu-latest environment: ${{ github.event.inputs.env }} steps: + - run: echo APP_NAME is ${{secrets.APP_NAME}} - uses: actions/checkout@v2 - uses: akhileshns/heroku-deploy@v3.6.8 # This is the action with: @@ -30,8 +31,6 @@ jobs: HD_UUID: ${{ secrets.HEROKU_V2RAY_UUID }} # UUID for v2ray user, 为了安全,一定要放入github action token中 NODE_ENV: production SECRET_KEY: ${{ secrets.MY_SECRET_KEY }} - - run: | - echo APP_NAME is ${{secrets.APP_NAME}} stop-start: if: ${{ github.event.inputs.actions == 'start' || github.event.inputs.actions == 'stop' }} runs-on: ubuntu-latest From 59f99ec4979420dbc8dd8caa693ca2a3269b5809 Mon Sep 17 00:00:00 2001 From: yaolin-0 <78028446+yaolin-0@users.noreply.github.com> Date: Fri, 8 Oct 2021 13:39:34 +0800 Subject: [PATCH 4/4] Update main.yml Improve description for the environment input. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03175f2..e72ebb9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ on: description: "action: deploy/stop/start" default: "deploy" env: - description: "environment: " + description: "environment: Input the name of Environment. If left blank, the main secrets setting will be used by default." default: "" jobs: