-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- api-gateway - scheduler - worker - taskmanager
- Loading branch information
Showing
387 changed files
with
75,449 additions
and
200 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,60 @@ | ||
name: build-and-push-api-gateway | ||
|
||
env: | ||
DOCKER_HUB_USERNAME: tuana9a | ||
IMAGE_NAME: tuana9a/dkhptd-api-gateway | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "api-gateway/**" | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ env.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Set docker tags | ||
run: | | ||
echo DOCKER_TAG_MONTHLY=$(date +"%Y.%m") >> $GITHUB_ENV | ||
echo DOCKER_TAG_DAILY=$(date +"%Y.%m.%d") >> $GITHUB_ENV | ||
echo DOCKER_TAG_SECONDLY=$(date +"%Y.%m.%d.%H%M%S") >> $GITHUB_ENV | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./api-gateway | ||
file: ./api-gateway/Dockerfile | ||
push: true | ||
tags: | | ||
${{ env.IMAGE_NAME }}:latest | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_SECONDLY }} | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_DAILY }} | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_MONTHLY }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Send notification | ||
if: always() | ||
shell: bash | ||
run: | | ||
curl -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage \ | ||
-H "Content-Type: application/json" \ | ||
-d "{ | ||
\"chat_id\":\"${{ secrets.TELEGRAM_CHAT_ID }}\", | ||
\"disable_notification\":true, | ||
\"text\":\"${{ job.status }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\\nimg: ${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_SECONDLY }}\" | ||
}" |
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,60 @@ | ||
name: build-and-push-scheduler | ||
|
||
env: | ||
DOCKER_HUB_USERNAME: tuana9a | ||
IMAGE_NAME: tuana9a/dkhptd-scheduler | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "scheduler/**" | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ env.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Set docker tags | ||
run: | | ||
echo DOCKER_TAG_MONTHLY=$(date +"%Y.%m") >> $GITHUB_ENV | ||
echo DOCKER_TAG_DAILY=$(date +"%Y.%m.%d") >> $GITHUB_ENV | ||
echo DOCKER_TAG_SECONDLY=$(date +"%Y.%m.%d.%H%M%S") >> $GITHUB_ENV | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./scheduler | ||
file: ./scheduler/Dockerfile | ||
push: true | ||
tags: | | ||
${{ env.IMAGE_NAME }}:latest | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_SECONDLY }} | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_DAILY }} | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_MONTHLY }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Send notification | ||
if: always() | ||
shell: bash | ||
run: | | ||
curl -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage \ | ||
-H "Content-Type: application/json" \ | ||
-d "{ | ||
\"chat_id\":\"${{ secrets.TELEGRAM_CHAT_ID }}\", | ||
\"disable_notification\":true, | ||
\"text\":\"${{ job.status }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\\nimg: ${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_SECONDLY }}\" | ||
}" |
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,60 @@ | ||
name: build-and-push-taskmanager | ||
|
||
env: | ||
DOCKER_HUB_USERNAME: tuana9a | ||
IMAGE_NAME: tuana9a/dkhptd-taskmanager | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "taskmanager/**" | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ env.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Set docker tags | ||
run: | | ||
echo DOCKER_TAG_MONTHLY=$(date +"%Y.%m") >> $GITHUB_ENV | ||
echo DOCKER_TAG_DAILY=$(date +"%Y.%m.%d") >> $GITHUB_ENV | ||
echo DOCKER_TAG_SECONDLY=$(date +"%Y.%m.%d.%H%M%S") >> $GITHUB_ENV | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./taskmanager | ||
file: ./taskmanager/Dockerfile | ||
push: true | ||
tags: | | ||
${{ env.IMAGE_NAME }}:latest | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_SECONDLY }} | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_DAILY }} | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_MONTHLY }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Send notification | ||
if: always() | ||
shell: bash | ||
run: | | ||
curl -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage \ | ||
-H "Content-Type: application/json" \ | ||
-d "{ | ||
\"chat_id\":\"${{ secrets.TELEGRAM_CHAT_ID }}\", | ||
\"disable_notification\":true, | ||
\"text\":\"${{ job.status }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\\nimg: ${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_SECONDLY }}\" | ||
}" |
60 changes: 60 additions & 0 deletions
60
.github/workflows/build-and-push-thoi-khoa-bieu-parser.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,60 @@ | ||
name: build-and-push-thoi-khoa-bieu-parser | ||
|
||
env: | ||
DOCKER_HUB_USERNAME: tuana9a | ||
IMAGE_NAME: tuana9a/dkhptd-thoi-khoa-bieu-parser | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "thoi-khoa-bieu-parser/**" | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ env.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Set docker tags | ||
run: | | ||
echo DOCKER_TAG_MONTHLY=$(date +"%Y.%m") >> $GITHUB_ENV | ||
echo DOCKER_TAG_DAILY=$(date +"%Y.%m.%d") >> $GITHUB_ENV | ||
echo DOCKER_TAG_SECONDLY=$(date +"%Y.%m.%d.%H%M%S") >> $GITHUB_ENV | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./thoi-khoa-bieu-parser | ||
file: ./thoi-khoa-bieu-parser/Dockerfile | ||
push: true | ||
tags: | | ||
${{ env.IMAGE_NAME }}:latest | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_SECONDLY }} | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_DAILY }} | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_MONTHLY }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Send notification | ||
if: always() | ||
shell: bash | ||
run: | | ||
curl -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage \ | ||
-H "Content-Type: application/json" \ | ||
-d "{ | ||
\"chat_id\":\"${{ secrets.TELEGRAM_CHAT_ID }}\", | ||
\"disable_notification\":true, | ||
\"text\":\"${{ job.status }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\\nimg: ${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_SECONDLY }}\" | ||
}" |
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,51 @@ | ||
name: build-and-push-web | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "web/**" | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
contents: read | ||
deployments: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Build | ||
working-directory: ./web | ||
shell: bash | ||
run: | | ||
npm i | ||
npm run build | ||
- name: Publish to Cloudflare Pages | ||
uses: cloudflare/pages-action@v1 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: dkhptd-web | ||
directory: ./web/dist/dkhptd-web/ | ||
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Send notification | ||
if: always() | ||
shell: bash | ||
run: | | ||
curl -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage \ | ||
-H "Content-Type: application/json" \ | ||
-d "{ | ||
\"chat_id\":\"${{ secrets.TELEGRAM_CHAT_ID }}\", | ||
\"disable_notification\":true, | ||
\"text\":\"${{ job.status }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\" | ||
}" |
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,60 @@ | ||
name: build-and-push-worker | ||
|
||
env: | ||
DOCKER_HUB_USERNAME: tuana9a | ||
IMAGE_NAME: tuana9a/dkhptd-worker | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "worker/**" | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ env.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Set docker tags | ||
run: | | ||
echo DOCKER_TAG_MONTHLY=$(date +"%Y.%m") >> $GITHUB_ENV | ||
echo DOCKER_TAG_DAILY=$(date +"%Y.%m.%d") >> $GITHUB_ENV | ||
echo DOCKER_TAG_SECONDLY=$(date +"%Y.%m.%d.%H%M%S") >> $GITHUB_ENV | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./worker | ||
file: ./worker/Dockerfile | ||
push: true | ||
tags: | | ||
${{ env.IMAGE_NAME }}:latest | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_SECONDLY }} | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_DAILY }} | ||
${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_MONTHLY }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Send notification | ||
if: always() | ||
shell: bash | ||
run: | | ||
curl -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage \ | ||
-H "Content-Type: application/json" \ | ||
-d "{ | ||
\"chat_id\":\"${{ secrets.TELEGRAM_CHAT_ID }}\", | ||
\"disable_notification\":true, | ||
\"text\":\"${{ job.status }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\\nimg: ${{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG_SECONDLY }}\" | ||
}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.js | ||
dist | ||
node_modules |
Oops, something went wrong.