2121# # Periodically syncs OpenVEX files against Erlang OTP Securities,
2222# # creating an automatic PR with the missing published securities.
2323name : OpenVEX Securities Syncing
24+ description : ' Sync OpenVEX Securities with Erlang/OTP published Securities'
2425
2526on :
2627 workflow_dispatch :
@@ -43,21 +44,35 @@ jobs:
4344 with :
4445 ref : ' master' # '' = default branch
4546
46- - uses : erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # racket :actions/checkout@v1
47+ - uses : erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # ratchet :actions/checkout@v1
4748 with :
4849 otp-version : ' 28'
4950
5051 -
uses :
openvex/setup-vexctl@e85ca48f3c8a376289f6476129d59cda82147e71 # ratchet:openvex/[email protected] 5152 with :
5253 vexctl-release : ' 0.3.0'
5354
55+ -
uses :
actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # ratchet:actions/[email protected] 56+ id : app-token
57+ with :
58+ # required
59+ app-id : ${{ vars.ERLANG_BOT_APP_ID }}
60+ private-key : ${{ secrets.ERLANG_BOT_PRIVATE_KEY }}
61+
5462 - name : Authenticate gh
5563 run : |
56- echo "${{ secrets.OPENVEX_TOKEN }}" | gh auth login --with-token
64+ echo "${{ steps.app-token.outputs.token }}" | gh auth login --with-token
65+
66+ - name : Get GitHub App User ID
67+ id : get-user-id
68+ run : echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
69+ env :
70+ GH_TOKEN : ${{ steps.app-token.outputs.token }}
71+
72+ - run : |
73+ git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
74+ git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
5775
5876 - name : ' Open OpenVEX Pull Requests for newly released vulnerabilities'
5977 run : |
6078 .github/scripts/otp-compliance.es vex verify -p
61- # env:
62- # GH_TOKEN: ${{ secrets.OPENVEX_TOKEN }}
63- # REPO: ${{ github.repository }}
0 commit comments