Skip to content

Release: 10/12/2024 - lithology - V1 #2

Release: 10/12/2024 - lithology - V1

Release: 10/12/2024 - lithology - V1 #2

name: Publish the new Lithology RDF to GraphDB/Public
on:
pull_request:
types:
- closed
jobs:
publish_gps:
runs-on: ubuntu-latest
if: "github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'"
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Upload file via PUT to graphdb-gps
env:
FILE_PATH: ./lithology.rdf # percorso del file che vuoi caricare
PUT_URL: https://dev-graphdbgps.swissgeol.ch/publish/lithology_swisstopo_public_core?context=https://dev-lexic.swissgeol.ch/Lithology/
TOKEN: ${{ secrets.LEXIC_CONTROLLED_VOCABULARIES_GRAPHDB_GPS_TOKEN }}
run: |
response=$(curl -w "%{http_code}" -X PUT -T $FILE_PATH -H "Authorization: Bearer $TOKEN" $PUT_URL -o response.txt)
if [[ "$response" -ge 200 && "$response" -lt 300 ]]; then
echo "Upload successful: HTTP $response"
else
echo "Upload failed: HTTP $response"
exit 1
fi