mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-26 15:05:29 +08:00
ensure branch test servers available after test runs (#2467)
* save server name to env * free server always; add PR to discord messages
This commit is contained in:
parent
2b48deaf61
commit
46cddad98a
1 changed files with 14 additions and 0 deletions
14
.github/workflows/deletedroplets.yml
vendored
14
.github/workflows/deletedroplets.yml
vendored
|
@ -19,6 +19,12 @@ jobs:
|
|||
- name: get server name
|
||||
run: |
|
||||
echo "SERVER=$(cat ./server/server)" >> $GITHUB_ENV
|
||||
- name: get PR
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
echo "pull_request=$(gh api -H 'Accept: application/vnd.github+json' -H 'X-Github-Api-Version: 2022-11-28' \
|
||||
/repos/${{ github.repository}}/actions/runs/${{ github.event.workflow_run.id }} | jq .pull_requests[0].number)" >> $GITHUB_ENV
|
||||
- name: discord success message
|
||||
uses: appleboy/discord-action@master
|
||||
with:
|
||||
|
@ -40,6 +46,7 @@ jobs:
|
|||
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
||||
TAG: ${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}
|
||||
- name: mark server as available
|
||||
if: success() || failure()
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: server.${{ env.SERVER }}.clustercat.com
|
||||
|
@ -60,6 +67,12 @@ jobs:
|
|||
- name: get server name
|
||||
run: |
|
||||
echo "SERVER=$(cat ./server/server)" >> $GITHUB_ENV
|
||||
- name: get PR
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
echo "pull_request=$(gh api -H 'Accept: application/vnd.github+json' -H 'X-Github-Api-Version: 2022-11-28' \
|
||||
/repos/${{ github.repository}}/actions/runs/${{ github.event.workflow_run.id }} | jq .pull_requests[0].number)" >> $GITHUB_ENV
|
||||
- name: discord failure message
|
||||
uses: appleboy/discord-action@master
|
||||
with:
|
||||
|
@ -90,6 +103,7 @@ jobs:
|
|||
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
||||
TAG: ${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}
|
||||
- name: mark server as available
|
||||
if: success() || failure()
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: server.${{ env.SERVER }}.clustercat.com
|
||||
|
|
Loading…
Add table
Reference in a new issue