-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from vatger/dev
Merge dev into main
- Loading branch information
Showing
52 changed files
with
1,114 additions
and
252 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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
node_modules | ||
dist | ||
dist | ||
|
||
README.md | ||
CONTRIBUTING.md |
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,32 @@ | ||
name: Docker CI/CD | ||
|
||
on: | ||
push: | ||
branches: [ "dev" ] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
run: | | ||
docker build --pull -t ${{ env.REGISTRY }}/${{ github.repository }}:latest . | ||
docker push ${{ env.REGISTRY }}/${{ github.repository }}:latest |
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
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
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
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
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
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
70 changes: 70 additions & 0 deletions
70
db/migrations/20221115171265-create-notification-tables.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,70 @@ | ||
const { DataType } = require("sequelize-typescript"); | ||
|
||
const CourseInformationModelAttributes = { | ||
id: { | ||
type: DataType.INTEGER, | ||
primaryKey: true, | ||
autoIncrement: true, | ||
}, | ||
uuid: { | ||
type: DataType.UUID, | ||
allowNull: false, | ||
}, | ||
user_id: { | ||
type: DataType.INTEGER, | ||
allowNull: false, | ||
references: { | ||
model: "users", | ||
key: "id", | ||
}, | ||
onUpdate: "cascade", | ||
onDelete: "cascade", | ||
}, | ||
author_id: { | ||
type: DataType.INTEGER, | ||
allowNull: true, | ||
references: { | ||
model: "users", | ||
key: "id", | ||
}, | ||
onUpdate: "cascade", | ||
onDelete: "set null", | ||
}, | ||
content_de: { | ||
type: DataType.TEXT("medium"), | ||
allowNull: false, | ||
}, | ||
content_en: { | ||
type: DataType.TEXT("medium"), | ||
allowNull: false, | ||
}, | ||
link: { | ||
type: DataType.STRING(255), | ||
allowNull: true, | ||
}, | ||
icon: { | ||
type: DataType.STRING(50), | ||
allowNull: true, | ||
}, | ||
severity: { | ||
type: DataType.ENUM("default", "info", "success", "danger"), | ||
allowNull: true, | ||
}, | ||
read: { | ||
type: DataType.BOOLEAN, | ||
allowNull: false, | ||
default: true, | ||
}, | ||
createdAt: DataType.DATE, | ||
updatedAt: DataType.DATE, | ||
}; | ||
|
||
module.exports = { | ||
async up(queryInterface) { | ||
await queryInterface.createTable("notifications", CourseInformationModelAttributes); | ||
}, | ||
|
||
async down(queryInterface) { | ||
await queryInterface.dropTable("notifications"); | ||
}, | ||
}; |
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.