Skip to content

Commit

Permalink
replace files deleted somhow!
Browse files Browse the repository at this point in the history
  • Loading branch information
smrgeoinfo committed Dec 18, 2023
1 parent cb659bf commit 4d3cd70
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM python:3-slim
WORKDIR /app
COPY ./.github/actions/github_action_main.py .
COPY ./tools ./tools
COPY ./vocabulary ./vocabulary
COPY ./docs ./docs
COPY ./cache ./cache

# RUN chmod a+x /app/github_action_main.py
RUN chmod a+x /app/github_action_main.py

# Quarto install instructions from https://www.r-bloggers.com/2022/07/how-to-set-up-quarto-with-docker-part-1-static-content/
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
gdebi-core \
&& rm -rf /var/lib/apt/lists/*

RUN pip install -r /app/tools/requirements.txt

RUN curl -LO https://quarto.org/download/latest/quarto-linux-amd64.deb
RUN gdebi --non-interactive quarto-linux-amd64.deb

ENV PYTHONPATH /app
ENTRYPOINT ["/app/github_action_main.py"]

# This is for debugging the Docker image build process, ensures the container stays up
# ENTRYPOINT ["tail", "-f", "/dev/null"]

39 changes: 39 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# action.yml
# see https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions
# for information on how this works

name: 'Vocabulary Action'
author: 'Dave Vieglais( https://orcid.org/0000-0002-6513-4996),
Stephen M Richard (https://orcid.org/0000-0001-6041-5302)'
description: 'creates a docker container to run python routines that
1) load skos (rdf/turtle) vocabularies into an sqlAlchmey
2) generate markdown from the skos vocabularies using Quarto markdown'
inputs:
action:
description: 'Which action to run -- defaults to uijson'
required: true
default: 'uijson'
path:
description: 'Path to the output directory for script output'
required: true
inputttl:
description: 'list of skos rdf/turtle files **without** the .ttl extension'
required: true
inputvocaburi:
description: 'list of ConceptScheme URIs for the skos vocabularies in this repo.
The URIs will be matched with the SKOS files based on order'
required: true

runs: # see https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-docker-container-actions
# for documentation
using: 'docker'
image: './Dockerfile'
# To access the environment variable in a Docker container action, you must pass
# the input using the args keyword in the action.yml metadata file.
# For more information about the action metadata file for Docker container actions,
# see "Creating a Docker container action."
args:
- ${{ inputs.action }}
- ${{ inputs.path }}
- ${{ inputs.inputttl }}
- ${{ inputs.inputvocaburi }}

0 comments on commit 4d3cd70

Please sign in to comment.