Skip to content

Commit

Permalink
Merge pull request #546 from the-hideout/start-and-stop
Browse files Browse the repository at this point in the history
Start and Stop workflows
  • Loading branch information
Razzmatazzz authored Jul 25, 2024
2 parents e2d2c75 + b2d2cb6 commit 5b8a60f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/start-vm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: start-vm

on:
workflow_dispatch:

jobs:
start-vm:
runs-on: ubuntu-latest
environment: production-secrets

steps:
- name: azure login
uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # [email protected]
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: start vm
uses: azure/CLI@965c8d7571d2231a54e321ddd07f7b10317f34d9 # [email protected]
with:
azcliversion: 2.50.0
inlineScript: |
az vm start --resource-group tdm_rg --name tdm_vm
24 changes: 24 additions & 0 deletions .github/workflows/stop-vm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# this workflow *can* take up to 10 minutes to fully shut down the VM

name: stop-vm

on:
workflow_dispatch:

jobs:
stop-vm:
runs-on: ubuntu-latest
environment: production-secrets

steps:
- name: azure login
uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # [email protected]
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: stop vm
uses: azure/CLI@965c8d7571d2231a54e321ddd07f7b10317f34d9 # [email protected]
with:
azcliversion: 2.50.0
inlineScript: |
az vm stop --resource-group tdm_rg --name tdm_vm
2 changes: 1 addition & 1 deletion .github/workflows/unlock-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: unlock on merge
uses: github/branch-deploy@v9.1.0
uses: github/branch-deploy@v9
id: unlock-on-merge
with:
unlock_on_merge_mode: "true" # <-- indicates that this is the "Unlock on Merge Mode" workflow
Expand Down

0 comments on commit 5b8a60f

Please sign in to comment.