Skip to content

Update CI reliability #894

Update CI reliability

Update CI reliability #894

# Set those repository secrets
# (https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets)
# USER_NAME - GitHub user name
# USER_TOKEN - GitHub access token
# JENKINS_TOKEN - GitHub user Jenkins token
name: Update CI reliability
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
create-report:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: npm i -g @node-core/utils
- run: ncu-config --global set jenkins_token ${{ secrets.JENKINS_TOKEN }}
- run: ncu-config --global set token ${{ secrets.USER_TOKEN }}
- run: ncu-config --global set username ${{ secrets.USER_NAME }}
- run: ncu-ci walk pr --stats=true --markdown $PWD/results.md
- run: cat $PWD/results.md >> $GITHUB_STEP_SUMMARY
- run: |
title_date=$(date +%Y-%m-%d)
echo "{ \"title\": \"CI Reliability ${title_date}\", \"body\": " >> body.json
cat results.md | python -c 'import json,sys; print(json.dumps(sys.stdin.read()))' >> body.json
echo "}" >> body.json
curl --request POST \
--url https://api.github.com/repos/${GITHUB_REPOSITORY}/issues \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
--data @body.json