Skip to content

fix: api-gateway/package.json & api-gateway/package-lock.json to redu… #5

fix: api-gateway/package.json & api-gateway/package-lock.json to redu…

fix: api-gateway/package.json & api-gateway/package-lock.json to redu… #5

name: test-build-worker
env:
DOCKER_HUB_USERNAME: tuana9a
IMAGE_NAME: tuana9a/dkhptd-worker
on:
push:
branches:
- "*"
- "!main"
paths:
- "worker/**"
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
uses: docker/build-push-action@v4
with:
context: ./worker
file: ./worker/Dockerfile
push: false
tags: |
${{ env.IMAGE_NAME }}:latest
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 }}\"
}"