-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb659bf
commit 4d3cd70
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
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
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"] | ||
|
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
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 }} |