Skip to content

Stablize Notifications Feature (#4860) #2580

Stablize Notifications Feature (#4860)

Stablize Notifications Feature (#4860) #2580

Workflow file for this run

name: Send strings for translation, and optionally commit back current translations
on:
# Runs workflow on commits to important branches
# Never commits updated string files back in this mode.
push:
branches:
- main
workflow_dispatch:
inputs:
commit_strings:
description: 'Whether to commit updated string files to branch'
type: boolean
default: false
# cancel workflow when a newer version of the workflow is triggered on the same github ref
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
runTDBuild:
name: Run Touchdown build
runs-on: ubuntu-latest
permissions: read-all
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Trigger touchdown build pipeline. Commit changes if specified on workflow dispatch input.
uses: Azure/[email protected]
with:
azure-devops-project-url: 'https://skype.visualstudio.com/SCC'
azure-pipeline-name: 'Azure.communication-ui-library-touchdown-build'
azure-devops-token: '${{ secrets.AZURE_TOUCHDOWN_BUILD_PIPELINE_SECRET }}'
# Only commit updated files back when explicitly requested.
azure-pipeline-variables: "{'commit': ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.commit_strings }} }"
check_failure:
runs-on: ubuntu-latest
permissions:
issues: write
needs: runTDBuild
if: failure()
name: Create GitHub issue on failure
steps:
# Failure of this action indicates a problem with our infrastructure.
# Always file a GitHub issue to alert the OCE of the problem.
- name: Create GitHub issue
id: create-issue
run: |
# check for an issue that is already open
curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/search/issues?q=org:Azure+repo:communication-ui-library+label:TDBUILD_FAILURE+state:open > $HOME/tdbuild_issues.json
issue_count=$(jq -r '.total_count' $HOME/tdbuild_issues.json)
if [ $issue_count -gt 0 ]; then
echo "No need to create new issue, one already exists"
else
curl -X POST -H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/Azure/communication-ui-library/issues -d '{"title":"Action to trigger TD Build failed", "body": "Please investigate: https://github.com/Azure/communication-ui-library/actions/runs/${{ github.run_id }}", "labels":["TDBUILD_FAILURE", "status:triage"]}'
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}