Merge branch 'master' into NET-296

This commit is contained in:
Matthew R Kasun 2023-06-06 15:31:02 -04:00 committed by GitHub
commit 77e669aea6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 3 deletions

View file

@ -21,7 +21,7 @@ jobs:
needs: skip-check
if: ${{ needs.skip-check.outputs.skip != 'true' }}
outputs:
netclientbranch: ${{ steps.checkbranch.outputs.netclientbranch }}
netclientbranch: ${{ steps.getbranch.outputs.netclientbranch }}
steps:
- name: checkout
uses: actions/checkout@v3

View file

@ -16,6 +16,12 @@ jobs:
with:
run_id: ${{ github.event.workflow_run.id}}
if_no_artifact_found: warn
- 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:
@ -23,7 +29,7 @@ jobs:
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#42f545"
username: "GitHub Bot"
message: "${{ github.repository }}: ${{ github.event.workflow_run.name }} was successful: droplets from this workflow (tag ${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}) will be deleted in 15 min"
message: "${{ github.repository }}: ${{ github.event.workflow_run.name }}:PR ${{ env.pull_request }} was successful: droplets from this workflow (tag ${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}) will be deleted in 15 min"
file: ./results/results.log
- name: delete droplets
if: success() || failure()
@ -46,6 +52,12 @@ jobs:
with:
run_id: ${{ github.event.workflow_run.id}}
if_no_artifact_found: warn
- 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:
@ -53,7 +65,7 @@ jobs:
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#990000"
username: "GitHub Bot"
message: "${{ github.repository }}: ${{ github.event.workflow_run.name }} failed: droplets from this workflow (tag ${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt}}) will be deleted in 5 hours"
message: "${{ github.repository }}: ${{ github.event.workflow_run.name }}:PR ${{ env.pull_request }} failed: droplets from this workflow (tag ${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt}}) will be deleted in 5 hours"
file: ./results/results.log
- name: discord error message
uses: appleboy/discord-action@master