Assigned RUSTSEC-2022-0093 to ed25519-dalek (#1745) #1145
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Assign IDs | |
on: | |
push: | |
branches: main | |
jobs: | |
assign-ids: | |
name: Assign IDs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache cargo bin | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/bin | |
key: rustsec-admin-v0.8.6 | |
- name: Install rustsec-admin | |
run: | | |
VERSION="0.8.6" | |
if ! ( rustsec-admin --version | grep -q "$VERSION" ); then | |
cargo install rustsec-admin --force --vers "$VERSION" | |
fi | |
- name: Assign IDs | |
id: assign | |
run: | | |
message=$(rustsec-admin assign-id --github-actions-output) | |
echo "commit_message=${message}" >> $GITHUB_OUTPUT | |
- name: Create duplicate ID assignment guard | |
run: | | |
echo "This file causes merge conflicts if two ID assignment jobs run concurrently." > .duplicate-id-guard | |
echo "This prevents duplicate ID assignment due to a race between those jobs." >> .duplicate-id-guard | |
ls -R ./crates/ ./rust/ | sha256sum >> .duplicate-id-guard | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: ${{ steps.assign.outputs.commit_message }} | |
title: ${{ steps.assign.outputs.commit_message }} | |
branch: assign-ids |