diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2dfd3558..8600f372 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,8 +5,7 @@ name: build on: push: - branches: - - develop + branches: [main, develop, 'GEN*', 'gen*'] pull_request: @@ -14,6 +13,10 @@ on: types: - created +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + jobs: test: @@ -77,3 +80,51 @@ jobs: run: python -m build - name: Publish to pypi uses: pypa/gh-action-pypi-publish@release/v1 + + + build-container: + needs: [test, lint] + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v3 + + - name: Log into registry ${{ env.REGISTRY }} + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Format tags as registry refs + id: registry_refs + env: + TAGS: ${{ steps.meta.outputs.json }} + run: | + echo tags=$(echo $TAGS | jq '.tags[] | "type=registry,ref=" + . + "_cache"| @text') >> $GITHUB_OUTPUT + + - name: Build and push Docker image + id: build-and-push + uses: docker/build-push-action@v5 + if: github.event_name != 'pull_request' + with: + context: . + push: true + provenance: false + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: ${{ steps.registry_refs.outputs.tags }},mode=max + cache-to: ${{ steps.registry_refs.outputs.tags }},mode=max diff --git a/Dockerfile b/Dockerfile index 0df6fe30..3d9638f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,6 +83,7 @@ WORKDIR /root/ # Must move this git clone to after the install of Genie, # because must update cbioportal RUN git clone https://github.com/cBioPortal/cbioportal.git -b v5.3.19 -RUN git clone https://github.com/Sage-Bionetworks/annotation-tools.git -b 0.0.4 +RUN git clone https://github.com/Sage-Bionetworks/annotation-tools.git -b 0.0.5 + WORKDIR /root/Genie diff --git a/genie/__init__.py b/genie/__init__.py index e991f2c2..f4e1680f 100644 --- a/genie/__init__.py +++ b/genie/__init__.py @@ -7,6 +7,6 @@ # create version in __init__.py # https://packaging.python.org/en/latest/guides/single-sourcing-package-version/ -__version__ = "16.2.0" +__version__ = "16.3.0" __all__ = ["__version__"]