From 29eaa2217b27cab0f3b752ff7b1d478b382d07dc Mon Sep 17 00:00:00 2001 From: YaphetKG Date: Tue, 14 Feb 2023 15:32:53 -0500 Subject: [PATCH] git actions and fix targets --- .github/workflows/release.yaml | 45 ++++++++++++++++++++++++++++++++++ Dockerfile | 20 +++++++++++++++ config/targets.json | 14 +++++------ 3 files changed, 72 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/release.yaml create mode 100644 Dockerfile diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..affe6c9 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,45 @@ +name: 'Release a new version to Github Packages' + +on: + release: + types: [published] + +env: + REGISTRY: ghcr.io + +jobs: + push_to_registry: + name: Push Docker image to GitHub Packages tagged with "latest" and version number. + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} + - name: Extract metadata (tags, labels) for Docker + id: meta_base_image + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: + ghcr.io/${{ github.repository }} + - name: Extract metadata (tags, labels) for Docker + id: meta_clustered_image + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: + ghcr.io/${{ github.repository }}-clustered + - name: Login to ghcr + uses: docker/login-action@v1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push base image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: ./ + push: true + tags: ${{ steps.meta_base_image.outputs.tags }} + labels: ${{ steps.meta_base_image.outputs.labels }} + build-args: VERSION=${{ steps.get_version.outputs.VERSION }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..12ec9e0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM renciorg/renci-python-image:v0.0.1 + +ARG VERSION=main + + +WORKDIR /home/benchmarks + +RUN git clone --branch ${VERSION} --single-branch https://github.com/TranslatorSRI/Benchmarks.git + +WORKDIR /home/benchmarks/Benchmarks + +ENV PYTHONPATH=/home/benchmarks/Benchmarks + +RUN pip install --upgrade pip + +RUN pip install . + +RUN chown nru:nru ./* + +USER nru diff --git a/config/targets.json b/config/targets.json index 3b087e6..02e959c 100644 --- a/config/targets.json +++ b/config/targets.json @@ -1,7 +1,7 @@ { "aragorn": { "fetch": { - "url": "https://aragorn.renci.org/1.2/query", + "url": "https://aragorn.renci.org/1.3/query", "workflow": [ {"id": "lookup"}, {"id": "overlay_connect_knodes"}, @@ -9,14 +9,14 @@ ] }, "fetch_unscored": { - "url": "https://aragorn.renci.org/1.2/query", + "url": "https://aragorn.renci.org/1.3/query", "workflow": [ {"id": "lookup"}, {"id": "overlay_connect_knodes"} ] }, "score": { - "url": "https://aragorn.renci.org/1.2/query", + "url": "https://aragorn.renci.org/1.3/query", "workflow": [ {"id": "score"} ] @@ -24,22 +24,22 @@ }, "arax": { "fetch": { - "url": "https://arax.ncats.io/api/arax/v1.2/query" + "url": "https://arax.transltr.io/api/arax/v1.3/query" } }, "bte": { "fetch": { - "url": "https://api.bte.ncats.io/v1/query" + "url": "https://bte.transltr.io/v1/query" } }, "explanatory": { "fetch": { - "url": "https://explanatory-agent.azurewebsites.net/v1.2/query" + "url": "https://explanatory-agent.transltr.io/v1.3/query" } }, "improving": { "fetch": { - "url": "https://ia.healthdatascience.cloud/api/v1.2/query" + "url": "https://ia.transltr.io/api/v1.3/query" } } } \ No newline at end of file