зеркало из
1
0
Форкнуть 0

CI build time improvement - replace slow github marketplace action (#467)

This commit is contained in:
James Burnside 2021-06-15 12:39:04 -07:00 коммит произвёл GitHub
Родитель e75803af57
Коммит a6f20b97a6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 9 добавлений и 9 удалений

5
.github/failed_ci_build_template.md поставляемый
Просмотреть файл

@ -1,5 +0,0 @@
---
title: Main CI Failed
labels: CI_FAILURE
---
Main CI Pipeline has failed. Please investigate.

13
.github/workflows/ci.yml поставляемый
Просмотреть файл

@ -72,9 +72,14 @@ jobs:
- name: Create issue if main branch CI failed
id: create-issue
if: failure() && github.ref == 'refs/heads/main'
uses: JasonEtco/create-an-issue@v2.4.0
with:
filename: .github/failed_ci_build_template.md
update_existing: true
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:CI_FAILURE+state:open > $HOME/ci_issues.json
issue_count=$(jq -r '.total_count' $HOME/ci_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":"Main branch CI Failed", "body": "Main CI Pipeline has failed. Please investigate.", "labels":["CI_FAILURE"]}'
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}