Skip to content

Merge pull request #55 from teknologi-umum/chore/april-maintenance #34

Merge pull request #55 from teknologi-umum/chore/april-maintenance

Merge pull request #55 from teknologi-umum/chore/april-maintenance #34

Workflow file for this run

name: Master
on:
push:
branches:
- master
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
ci:
name: CI
runs-on: ubuntu-latest
container: node:20-bookworm
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup tzdata
run: apt-get update -y && apt-get upgrade -y && apt-get install -y tzdata
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Install dependencies
run: pnpm install
- name: Lint
run: npx eslint --ignore-path .gitignore .
- name: Formatting
run: npx prettier --check **/*.{ts,astro,json,cjs,mjs}
- name: Build
run: pnpm run build
- name: Test
run: pnpm run test
env:
TZ: Asia/Jakarta
- uses: codecov/codecov-action@v3
cd:
name: CD
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@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
secrets: |
"SENTRY_DSN=${{ secrets.SENTRY_DSN }}"
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"