Skip to content

Create auto_create_purls.yml #31

Create auto_create_purls.yml

Create auto_create_purls.yml #31

name: extract_terms_without_purls_yaml
on:
push:
branches:
- main
jobs:
extract_terms_without_purls:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: extract all dpbo terms
run: |
grep -E 'id: DPBO:[0-9]+' dpbo.obo > new_extraction.txt
- name: extract TANs and replace colon
run: |
sed -i 's/id: DPBO:\([0-9]\+\)/DPBO_\1/g' new_extraction.txt
- name: sort files
run: |
sort new_extraction.txt > new_extraction_sorted.txt
sort purls.txt > purls_sorted.txt
- name: get difference in files
run: |
comm -23 new_extraction_sorted.txt purls_sorted.txt > missing_purls.txt
- name: remove temporary new file
run: |
rm new_extraction.txt
rm new_extraction_sorted.txt
rm purls_sorted.txt
- name: commit and push
uses: mikeal/publish-to-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: 'main'