Skip to content

Commit

Permalink
Merge pull request #87 from XionWCFM/update
Browse files Browse the repository at this point in the history
feat: 전체적인 의존성 Bump , workflows 개선
  • Loading branch information
XionWCFM authored Dec 1, 2024
2 parents 2fe3e1a + 09baeb0 commit bbeb038
Show file tree
Hide file tree
Showing 82 changed files with 2,107 additions and 4,255 deletions.
17 changes: 17 additions & 0 deletions .github/actions/pnpm-cache-store/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: get pnpm cache store and setup
description: setup pnpm cache
runs:
using: composite
steps:
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
11 changes: 11 additions & 0 deletions .github/actions/pnpm-setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: setup pnpm & node
description: setup pnpm & node
runs:
using: composite
steps:
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
node-version-file: ".nvmrc"
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
11 changes: 11 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"@apps/blog":
- changed-files:
- any-glob-to-any-file: "apps/blog/**"

"@apps/grasshopper":
- changed-files:
- any-glob-to-any-file: "apps/grasshopper/**"

"packages":
- changed-files:
- any-glob-to-any-file: "packages/**"
3 changes: 0 additions & 3 deletions .github/scripts/ci-comment.js

This file was deleted.

36 changes: 0 additions & 36 deletions .github/scripts/combine-test-results.js

This file was deleted.

50 changes: 0 additions & 50 deletions .github/scripts/create-test-comment.js

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]

jobs:
build:
name: Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest
# To use Remote Caching, uncomment the next lines and follow the steps below.
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_REMOTE_ONLY: true

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
if: steps.cache.outputs.cache-hit == false
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm run build

98 changes: 0 additions & 98 deletions .github/workflows/ci-cd.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/commit-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Commit Message Labeler

on:
pull_request:
types: [opened, synchronize]

jobs:
labeler:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Fetch commit messages and apply labels
uses: actions/github-script@v6
with:
script: |
const prNumber = context.payload.pull_request.number;
const { data: commits } = await github.rest.pulls.listCommits({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
});
const commitMessages = commits.map(commit => commit.commit.message);
console.log("Fetched commit messages:", commitMessages);
const labels = ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"];
const labelsToAdd = [];
labels.forEach(label => {
const regex = new RegExp(`^${label}:\\s`, "i");
if (commitMessages.some(message => regex.test(message))) {
labelsToAdd.push(label);
}
});
console.log("Labels to add:", labelsToAdd);
if (labelsToAdd.length > 0) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
labels: labelsToAdd,
});
}
27 changes: 27 additions & 0 deletions .github/workflows/knip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Knip

on:
push:
branches: [dev]
pull_request:
types: [opened, synchronize, reopened]
env:
CI: ${{ vars.CI }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
knip:
name: Knip
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup-node

- run: pnpm install --frozen-lockfile
- run: pnpm ci:knip

- name: Run Knip
id: knip
run: pnpm ci:knip > knip-output.txt || true
14 changes: 14 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Pull Request Labeler

on: pull_request_target

jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit bbeb038

Please sign in to comment.