Skip to content

Merge pull request #211 from teknologi-umum/hotfix/hackernews-timer #268

Merge pull request #211 from teknologi-umum/hotfix/hackernews-timer

Merge pull request #211 from teknologi-umum/hotfix/hackernews-timer #268

Workflow file for this run

name: Deploy
on:
push:
branches:
- master
jobs:
ci:
name: CI
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Installling dependencies
run: npm install
- name: ESLint check
run: npx eslint --ignore-path .gitignore .
- name: Test
run: npm run test
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Send coverage report to Codecov
uses: codecov/codecov-action@v3
cd:
name: Build Image
needs:
- ci
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
flavor: |
latest=false
tags: |
type=edge
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}