12 Commits

Author SHA1 Message Date
2825436969 release 2.0.3 2020-05-17 13:08:09 -05:00
Alex Brow
ccb79f1233 Merge branch 'master' of github.com:Technicolor-creamsicle/Osselbot 2020-05-17 03:29:56 -04:00
Alex Brow
866756dfb2 eee 2020-05-17 03:28:09 -04:00
Alex
9cef57c075 Create nodejs.yml 2020-05-17 03:12:35 -04:00
Alex Brow
e0d2b5d291 lego? 2020-05-17 02:59:12 -04:00
Alex
80c6a2fe8c Create npmpublish.yml 2020-05-17 02:39:28 -04:00
5c2692b660 nfnfnfnnfnfnfn 2020-05-15 16:51:26 -05:00
3f9532cf56 removing docker 2020-05-15 15:44:19 -05:00
91f4c849eb package overhaul 2020-05-15 15:41:44 -05:00
b0d6c6490e maybe 2020-05-15 15:23:11 -05:00
dac06d57e1 yes 2020-05-15 15:14:32 -05:00
6732fe4db5 switch to npm builds 2020-05-15 15:01:54 -05:00
12 changed files with 102 additions and 113 deletions

View File

@@ -1,17 +0,0 @@
name: Docker Image CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file Dockerfile --tag osselbot:$(date +%s)

View File

@@ -1,20 +0,0 @@
name: Publish Docker image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: techniclor-creamsicle/osselbot/osselbot
tag_with_ref: true

View File

@@ -1,20 +0,0 @@
name: Publish Docker image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: techniclor-creamsicle/osselbot/osselbot
tag_with_ref: true

29
.github/workflows/nodejs.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test

33
.github/workflows/npmpublish.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Node.js Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm test
publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

2
.npmrc Normal file
View File

@@ -0,0 +1,2 @@
;setting up my registry
@technicolor-creamsicle:registry=https://npm.pkg.github.com/

View File

@@ -1,17 +0,0 @@
# Use the official image as a parent image.
FROM node:current-slim
# Set the working directory.
WORKDIR ./DOCKER
# Copy the file from your host to your current location.
COPY ./package.json .
COPY ./package-lock.json .
# Run the command inside your image filesystem.
RUN npm install
# Run the specified command within the container.
CMD [ "npm", "start" ]
# Copy the rest of your app's source code from your host to your image filesystem.
COPY ./src/ .

View File

@@ -1,5 +1,3 @@
# Osselbot
A bot that is kinda stupid but it works surprisingly well
![Docker Image CI](https://github.com/Technicolor-creamsicle/Osselbot/workflows/Docker%20Image%20CI/badge.svg)
![Node.js CI](https://github.com/Technicolor-creamsicle/Osselbot/workflows/Node.js%20CI/badge.svg)

View File

@@ -1,10 +0,0 @@
#!/usr/bin/env bash
#logs in as Alex
cat ~/.GHTOKEN | docker login https://docker.pkg.github.com -u technicolor-creamsicle --password-stdin
#Builds the package
docker build --tag osselbot .
#pushes to github
docker tag osselbot:latest docker.pkg.github.com/techniclor-creamsicle/osselbot/osselbot:$1
docker push docker.pkg.github.com/techniclor-creamsicle/osselbot/osselbot:$1
echo build may have passed using version: $1

View File

@@ -1,6 +1,6 @@
{
"name": "osselbot",
"version": "1.1.0",
"name": "@technicolor-creamsicle/osselbot",
"version": "2.0.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,26 +1,32 @@
{
"name": "osselbot",
"version": "1.1.0",
"description": "Discordbot on Discord.js",
"main": "index.js",
"dependencies": {
"discord.js": "^12.1.1",
"n": "^6.4.0",
"pretty-ms": "^6.0.1"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node ./index.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Technicolor-creamsicle/Osselbot.git"
},
"author": "Alex Technicolor <technicolor@2a03.party> (http://technicolor.2a03.party)",
"license": "SEE LICENSE IN LICENCE",
"bugs": {
"url": "https://github.com/Technicolor-creamsicle/Osselbot/issues"
},
"homepage": "https://technicolor.2a03.party/bot"
"name": "@technicolor-creamsicle/osselbot",
"version": "2.0.3",
"description": "A discord bot on Discord.js",
"main": "index.js",
"dependencies": {
"discord.js": "^12.1.1",
"n": "^6.4.0",
"pretty-ms": "^6.0.1"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"files": [
"/src/"
],
"devDependencies": {},
"scripts": {
"test": "node ./src/index --TEST",
"start": "npm install; node ./src/index.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Technicolor-creamsicle/Osselbot.git"
},
"author": "Alex Technicolor <technicolor@2a03.party> (http://technicolor.2a03.party)",
"license": "SEE LICENSE IN LICENCE",
"bugs": {
"url": "https://github.com/Technicolor-creamsicle/Osselbot/issues"
},
"homepage": "https://technicolor.2a03.party/bot"
}

View File

@@ -152,5 +152,10 @@ client.on("message", async message => {
};
});
if(process.argv.slice(2).includes("--TEST")) {
console.log("Test Pass!");
process.exit(0);
};
//Logging in the bot
client.login(config.token)