mirror of
https://github.com/lush2020/edgetunnel.git
synced 2026-03-22 01:22:21 +08:00
enable region
This commit is contained in:
32
.github/workflows/main.yml
vendored
32
.github/workflows/main.yml
vendored
@@ -27,29 +27,23 @@ jobs:
|
||||
actions: ${{ github.event.inputs.actions || 'deploy'}}
|
||||
herokuAppName: ${{ steps.herokuAppName.outputs.name }}
|
||||
test111: ${{ github.event.inputs.env }} # todo
|
||||
APP_NAME: ${{ secrets.APP_NAME }}
|
||||
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::${{ secrets.APP_NAME }}"
|
||||
- id: test
|
||||
# if: ${{ github.event.inputs.actions == 'start'}}
|
||||
run: echo ${{ secrets.APP_NAME }} | sed 's/./& /g'
|
||||
run: echo "::set-output name=name::${{ github.event.inputs.heroku-app-name || env.APP_NAME }}"
|
||||
- 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
|
||||
steps:
|
||||
# - id: test-env
|
||||
# if: ${{ env.test-env }}
|
||||
# run: echo needs.jobenv.outputs.herokuAppName is ${{needs.jobenv.outputs.herokuAppName}}
|
||||
- run: echo test111 is ${{needs.jobenv.outputs.test111}}
|
||||
- run: echo ${{needs.jobenv.outputs.herokuAppName}} | sed 's/./& /g'
|
||||
- run: echo ${{needs.jobenv.outputs.APP_NAME}} | sed 's/./& /g'
|
||||
|
||||
# output-jobenv:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: jobenv
|
||||
# steps:
|
||||
# # - id: test-env
|
||||
# # if: ${{ env.test-env }}
|
||||
# # run: echo needs.jobenv.outputs.herokuAppName is ${{needs.jobenv.outputs.herokuAppName}}
|
||||
# - run: echo test111 is ${{needs.jobenv.outputs.test111}}
|
||||
# - run: echo ${{needs.jobenv.outputs.herokuAppName}} | sed 's/./& /g'
|
||||
|
||||
heroku-deploy:
|
||||
needs: jobenv
|
||||
@@ -88,6 +82,6 @@ jobs:
|
||||
- run: |
|
||||
echo action is ${{ needs.jobenv.outputs.actions }}
|
||||
if [[ ${{ needs.jobenv.outputs.actions }} == 'stop' ]]; then heroku ps:scale web=0 -a ${{needs.jobenv.outputs.herokuAppName}} && echo "stop"; fi
|
||||
if [[ ${{ needs.jobenv.outputs.actions }} == 'start' ]]; then heroku ps:scale web=1 -a ${{secrets.APP_NAME}} && echo "start"; fi
|
||||
heroku ps -a ${{secrets.APP_NAME}}
|
||||
if [[ ${{ needs.jobenv.outputs.actions }} == 'destroy' ]]; then heroku apps:destroy -a ${{secrets.APP_NAME}} --confirm ${{needs.jobenv.outputs.heroku-app-name}} && echo "destroy app"; fi
|
||||
if [[ ${{ needs.jobenv.outputs.actions }} == 'start' ]]; then heroku ps:scale web=1 -a ${{needs.jobenv.outputs.herokuAppName}} && echo "start"; fi
|
||||
heroku ps -a ${{needs.jobenv.outputs.herokuAppName}}
|
||||
if [[ ${{ needs.jobenv.outputs.actions }} == 'destroy' ]]; then heroku apps:destroy -a ${{needs.jobenv.outputs.herokuAppName}} --confirm ${{needs.jobenv.outputs.herokuAppName}} && echo "destroy app"; fi
|
||||
|
||||
Reference in New Issue
Block a user