From b761e5eef788eea3559fdb30b9b903cef1ae281e Mon Sep 17 00:00:00 2001 From: Dany Castillo <31006608+dcastil@users.noreply.github.com> Date: Sat, 22 Jun 2024 14:19:33 +0200 Subject: [PATCH] add empty metrics-report-action --- .github/actions/metrics-report/action.yml | 6 ++++ .github/actions/metrics-report/main.js | 3 ++ .github/actions/metrics-report/package.json | 11 +++++++ .github/workflows/metrics-report.yml | 32 +++++++++++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 .github/actions/metrics-report/action.yml create mode 100644 .github/actions/metrics-report/main.js create mode 100644 .github/actions/metrics-report/package.json create mode 100644 .github/workflows/metrics-report.yml diff --git a/.github/actions/metrics-report/action.yml b/.github/actions/metrics-report/action.yml new file mode 100644 index 00000000..29b39013 --- /dev/null +++ b/.github/actions/metrics-report/action.yml @@ -0,0 +1,6 @@ +name: 'metrics-report-action' +author: 'Dany Castillo' +description: 'Posts a comment with a report about changes in important metrics related to tailwind-merge' +runs: + using: 'node20' + main: 'main.js' diff --git a/.github/actions/metrics-report/main.js b/.github/actions/metrics-report/main.js new file mode 100644 index 00000000..539ac9db --- /dev/null +++ b/.github/actions/metrics-report/main.js @@ -0,0 +1,3 @@ +// @ts-check + +console.log('Hello, world!') diff --git a/.github/actions/metrics-report/package.json b/.github/actions/metrics-report/package.json new file mode 100644 index 00000000..ebc0fc04 --- /dev/null +++ b/.github/actions/metrics-report/package.json @@ -0,0 +1,11 @@ +{ + "name": "metrics-report-action", + "version": "0.1.0", + "private": true, + "author": "Dany Castillo", + "type": "module", + "scripts": { + "start": "node main.js" + }, + "dependencies": {} +} diff --git a/.github/workflows/metrics-report.yml b/.github/workflows/metrics-report.yml new file mode 100644 index 00000000..ea0e836b --- /dev/null +++ b/.github/workflows/metrics-report.yml @@ -0,0 +1,32 @@ +name: Metrics report + +on: [pull_request] + +jobs: + size: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/checkout@v4 + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20.11.1 + - name: Use node_modules cache + uses: actions/cache@v4 + with: + path: node_modules + key: yarn-node-20-lock-${{ hashFiles('yarn.lock') }} + restore-keys: | + yarn-node-20-lock- + - run: yarn install --frozen-lockfile + - name: Use node_modules cache for metrics-report-action + uses: actions/cache@v4 + with: + path: .github/actions/metrics-report/node_modules + key: yarn-node-20-metrics-report-action-lock-${{ hashFiles('.github/actions/metrics-report/yarn.lock') }} + restore-keys: | + yarn-node-20-metrics-report-action-lock- + - run: yarn --cwd .github/actions/metrics-report install --frozen-lockfile + - uses: ./.github/actions/metrics-report