From 8aa0bd035b96486c9afc82878d18c1ce0575b8e3 Mon Sep 17 00:00:00 2001 From: Brendan Galloway Date: Wed, 15 May 2024 11:08:42 +0200 Subject: [PATCH 1/3] chore: remove Dockerfile --- Dockerfile | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 793b756..0000000 --- a/Dockerfile +++ /dev/null @@ -1,45 +0,0 @@ -# Use the official Ubuntu 20.04 LTS as a base image -FROM ubuntu:20.04 - -# Avoid prompts from apt operations -ENV DEBIAN_FRONTEND=noninteractive - -# Set the working directory to /app -WORKDIR /app - -# Copy the current directory contents into the container at /app -COPY . . - -# Install necessary system packages -RUN apt-get update && \ - apt-get install -y wget && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Install Miniconda -RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \ - /bin/bash ~/miniconda.sh -b -p /opt/conda && \ - rm ~/miniconda.sh - -# Set PATH for conda -ENV PATH /opt/conda/bin:$PATH - -# Create a Conda environment -RUN conda create -n vh-env python=3.8 -y - -# Activate the Conda environment in all subsequent RUN commands -SHELL ["conda", "run", "-n", "vh-env", "/bin/bash", "-c"] - -# Install packages from requirements.txt using Conda from the conda-forge channel, excluding neo4j -# Assuming requirements.txt is modified to exclude neo4j==5.17.0=pypi_0 -RUN conda install -c conda-forge --file requirements.txt -y - -# Use pip to install neo4j, as it's available on PyPI -RUN pip install neo4j==5.17.0 - -HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ - CMD pgrep -f slack_app.py || exit 1 - -# The code to run when container is started -ENTRYPOINT ["conda", "run", "-n", "vh-env", "python", "slack_app.py"] - From a866fa257432ef1de4c538bf5176043b147914a1 Mon Sep 17 00:00:00 2001 From: Brendan Galloway Date: Wed, 15 May 2024 11:09:13 +0200 Subject: [PATCH 2/3] chore: rename example app --- slack_app.py => example_app.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename slack_app.py => example_app.py (100%) diff --git a/slack_app.py b/example_app.py similarity index 100% rename from slack_app.py rename to example_app.py From 639424a9e7a59b0da1064e2ca70287cb4ad789f0 Mon Sep 17 00:00:00 2001 From: Brendan Galloway Date: Wed, 15 May 2024 11:14:29 +0200 Subject: [PATCH 3/3] feat: add release pipeline --- .github/workflows/release.yaml | 30 ++++++++++++++++++++++++++++++ .releaserc | 31 +++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .github/workflows/release.yaml create mode 100644 .releaserc diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..c2ea3f1 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + branches: + - main + workflow_dispatch: {} + +jobs: + release: + name: Release Library + runs-on: ubuntu-latest + permissions: + contents: write # needed to write releases + if: | + (github.repository == 'sefaria/AppliedAI') + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: cycjimmy/semantic-release-action@v4 + id: semantic + with: + semantic_version: 18.0.1 + extra_plugins: | + conventional-changelog-conventionalcommits@6.1.0 + @semantic-release/exec@6.0.3 + @semantic-release/git@10.0.1 + @semantic-release/commit-analyzer@9.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..6903d15 --- /dev/null +++ b/.releaserc @@ -0,0 +1,31 @@ +tagFormat: v${version} +plugins: + - - "@semantic-release/commit-analyzer" + - "preset": "conventionalcommits" + "releaseRules": + - {"type": "static", "release": "patch"} + - {"type": "chore", "release": "patch"} + - {"type": "helm", "release": false} + - - "@semantic-release/release-notes-generator" + - "preset": "conventionalcommits" + "presetConfig": + "types": + - {"type": "feat", "section": "Features"} + - {"type": "fix", "section": "Bug Fixes"} + - {"type": "chore", "hidden": true} + - {"type": "docs", "hidden": true} + - {"type": "style", "hidden": true} + - {"type": "refactor", "hidden": true} + - {"type": "perf", "hidden": true} + - {"type": "test", "hidden": true} + - {"type": "static", "section": "Static Content"} + - {"type": "helm", "hidden": true} + - - "@semantic-release/github" + - "successComment": false +# - - "@semantic-release/exec" +# - "prepareCmd": "../build/app-prerelease.sh ${nextRelease.gitTag}" +# - - "@semantic-release/git" +# - assets: +# - ../.github/workflows/deploy.yaml +branches: + - name: "main"