mirror of
https://github.com/azure/login.git
synced 2026-03-12 18:07:08 -04:00
Update azure-login-canary.yml (#230)
This commit is contained in:
21
.github/workflows/azure-login-canary.yml
vendored
21
.github/workflows/azure-login-canary.yml
vendored
@@ -43,3 +43,24 @@ jobs:
|
||||
client-id: ${{ secrets.AZURE_CLIENTID }}
|
||||
tenant-id: ${{ secrets.AZURE_TENANTID }}
|
||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTIONID }}
|
||||
slack-post-result:
|
||||
runs-on: ubuntu-latest
|
||||
# continue-on-error: true
|
||||
if: ${{ always() }}
|
||||
needs: [az-login-test]
|
||||
steps:
|
||||
- name: Create slack post
|
||||
id: slack_report
|
||||
run: |
|
||||
TITLE="Login action canary tests update - "
|
||||
DATEVAR=`date "+%d/%m/%YT%H:%M:%S"`
|
||||
TITLE="${TITLE}${DATEVAR}"
|
||||
REPORT="${TITLE}\r\nLink to run - https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID\r\n"
|
||||
RUN_URL="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
|
||||
REPORT="${REPORT}\r\n"
|
||||
if [ ${{needs.az-login-test.result}} == 'success' ]; then REPORT="${REPORT}\r\n|✅|<${RUN_URL}|az-login-test>"; else REPORT="${REPORT}\r\n|❌|<${RUN_URL}|az-login-test>"; fi
|
||||
echo "::set-output name=report::$REPORT"
|
||||
- name: Post to slack
|
||||
shell: bash
|
||||
run: curl -X POST -H 'Content-type:application/json' --data '{"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"${{steps.slack_report.outputs.report}}"}}]}' https://hooks.slack.com/services/${{SECRETS.SLACK_CHANNEL_SECRET}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user