-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'features/self-deploy-PRE' into actions/replacebot-v3-sd1
# Conflicts: # tybotRoute/CHANGELOG.md # tybotRoute/package-lock.json # tybotRoute/package.json
- Loading branch information
Showing
50 changed files
with
1,022 additions
and
538 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,35 @@ | ||
name: Docker Image Community latest CI - Tiledesk Chatbot | ||
|
||
env: | ||
REGISTRY: tiledeskrepo | ||
IMAGE_NAME: tiledesk-chatbot | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
repository: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest |
48 changes: 48 additions & 0 deletions
48
.github/workflows/docker-image-tag-community-tag-push.yaml
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,48 @@ | ||
name: Publish Docker Community image tags - Tiledesk Chatbot | ||
|
||
env: | ||
REGISTRY: tiledeskrepo | ||
IMAGE_NAME: tiledesk-chatbot | ||
|
||
on: | ||
push: | ||
tags: | ||
- '**' # Push events to every tag including hierarchical tags like | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
|
||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
repository: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tag_with_ref: true | ||
|
||
- name: Generate Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=ref,event=branch | ||
type=semver,pattern={{version}} | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} |
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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
# Tiledesk native chatbot | ||
|
||
### 0.1.1 updated MarckbotPlugs.js & DirectivesPlug.js | ||
|
||
# 1.0.2 | ||
- bug-fixed: default engine for DirAskGPTV2 | ||
- bug-fixed: block only hidden message | ||
|
||
# 1.0.1 | ||
- first deploy of Chatbot Plugs | ||
|
||
### 0.1.1 updated MarckbotPlugs.js & DirectivesPlug.js |
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,34 @@ | ||
FROM node:16 | ||
|
||
RUN sed -i 's/stable\/updates/stable-security\/updates/' /etc/apt/sources.list | ||
|
||
|
||
RUN apt-get update | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
ARG NPM_TOKEN | ||
|
||
RUN if [ "$NPM_TOKEN" ]; \ | ||
then RUN COPY .npmrc_ .npmrc \ | ||
else export SOMEVAR=world; \ | ||
fi | ||
|
||
|
||
# Install app dependencies | ||
# A wildcard is used to ensure both package.json AND package-lock.json are copied | ||
# where available (npm@5+) | ||
COPY package*.json ./ | ||
|
||
RUN npm install --production | ||
|
||
RUN rm -f .npmrc | ||
|
||
# Bundle app source | ||
COPY . . | ||
|
||
EXPOSE 3000 | ||
|
||
CMD [ "npm", "start" ] | ||
|
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,20 @@ | ||
#npm version patch | ||
version=`node -e 'console.log(require("./package.json").version)'` | ||
echo "version $version" | ||
|
||
## Update package-lock.json | ||
npm install | ||
|
||
## Push commit to git | ||
git add . | ||
git commit -m "version added: ### $version" | ||
git push remote master | ||
|
||
## Create tag and npm | ||
if [ "$version" != "" ]; then | ||
git tag -a "$version" -m "`git log -1 --format=%s`" | ||
echo "Created a new tag, $version" | ||
git push --tags | ||
cd ./tybotRoute | ||
npm publish --access public | ||
fi |
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
Oops, something went wrong.