Ontology-tracker #36027
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: Ontology-tracker | |
on: | |
schedule: | |
- cron: '10,40 * * * *' | |
jobs: | |
deploy-new-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Install raptor-utils | |
run: | | |
# Install raptor-utils for parsing | |
sudo apt-get install raptor2-utils | |
- name: Add PKCS12 webid file | |
env: | |
# Not used if WEBID_BASE64 is set. But generation similar to WEBID_BASE64 just with certificate and key seperated | |
WEBID_KEY: ${{ secrets.WEBID_KEY }} | |
WEBID_CRT: ${{ secrets.WEBID_CRT }} | |
# How to set the WEBID_BASE64 variable: | |
# 1. Follow the webid-guide here: https://github.com/dbpedia/webid (Note: Don't use a password on the .p12 file) | |
# 2. Result from 1. should be webid_bundle.pfx or webid_bundle.p12 -> run base64 webid_bundle.p12 > webid_bundle.p12.base64 | |
# 3. Copy the content from webid_bundle.p12.base64 into the github secret and name it accordingly | |
WEBID_BASE64: ${{ secrets.WEBID_BASE64 }} | |
run: | | |
git config --local user.email "ontology-commit-bot@test" | |
git config --local user.name "ontology-commit-bot" | |
# Generating the PKCS12 file from github secrets certificate and key | |
if [[ -n $WEBID_BASE64 ]] | |
then | |
echo "$WEBID_BASE64" | base64 --decode > ~/.m2/webid_bundle.p12 | |
elif [[ -n $WEBID_KEY ]] && [[ -n $WEBID_CRT ]] | |
then | |
echo "$WEBID_KEY" > ~/.m2/webid_key.pem | |
echo "$WEBID_CRT" > ~/.m2/webid_crt.pem | |
openssl pkcs12 -export -out ~/.m2/webid_bundle.p12 -inkey ~/.m2/webid_key.pem -in ~/.m2/webid_crt.pem -passout pass: | |
else | |
echo "No proper webid in secrets!" | |
exit 1 | |
fi | |
- name: Run the script | |
run: | | |
# Run the script | |
bash -c databus/dbpedia/ontology/databus-ontology-diffbot.sh |