From b4c007a01561b806448769cac16e714a52862005 Mon Sep 17 00:00:00 2001 From: denbon05 Date: Tue, 22 Aug 2023 18:03:44 +0200 Subject: [PATCH] Remove autodeploy (only for organization bypass protected) --- .github/workflows/bump.yml | 34 -------------------------------- .github/workflows/dependabot.yml | 6 ++---- .github/workflows/npm.yml | 4 ++-- README.md | 8 +++----- package-lock.json | 9 ++++++--- 5 files changed, 13 insertions(+), 48 deletions(-) delete mode 100644 .github/workflows/bump.yml diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml deleted file mode 100644 index f8dce52..0000000 --- a/.github/workflows/bump.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Auto bump package version - -# Fire after merge to the main branch -# Depends on CI success completion -on: - workflow_run: - workflows: - - Node CI - branches: - - main - types: - - completed - -permissions: - contents: write - -jobs: - bump: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: Automated version bump - uses: 'phips28/gh-action-bump-version@master' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag-prefix: 'v' - major-wording: 'BREAKING CHANGE,MAJOR,cut-major' - minor-wording: 'minor,feat' - patch-wording: 'Bump,patch,fixes' - rc-wording: 'RELEASE,alpha' diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 55e14ee..e510d52 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -10,7 +10,6 @@ on: - completed permissions: - contents: write pull-requests: write jobs: @@ -25,9 +24,8 @@ jobs: with: github-token: '${{ secrets.GITHUB_TOKEN }}' - - name: Enable auto-merge for Dependabot PRs - if: ${{contains(steps.metadata.outputs.dependency-names, 'my-dependency') && steps.metadata.outputs.update-type == 'version-update:semver-patch'}} - run: gh pr merge --auto --merge "$PR_URL" + - name: Approve a PR + run: gh pr review --approve "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 0a29ba8..03f6081 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -3,7 +3,7 @@ name: Publish package to npmjs on: workflow_run: workflows: - - Auto bump package version + - Node CI branches: - main types: @@ -14,7 +14,7 @@ on: jobs: publish: runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: ${{ github.event.workflow_run.conclusion == 'success' && github.actor != 'dependabot[bot]' }} steps: - uses: actions/checkout@v3 diff --git a/README.md b/README.md index 1e3df1a..bf094c2 100644 --- a/README.md +++ b/README.md @@ -14,17 +14,15 @@ npm i fastify-lcache ## Example -```ts -const address = '0.0.0.0'; -const port = 4000; -``` - ```ts // your app import fastify from 'fastify'; import lcache from 'fastify-lcache'; const app = fastify(); +const address = '0.0.0.0'; +const port = 4000; + app.register(lcache, { ttlInMinutes: 10, // set cached data lifetime to 10 minutes }); diff --git a/package-lock.json b/package-lock.json index 222522b..9094c9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7956,7 +7956,8 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true + "dev": true, + "requires": {} }, "acorn-walk": { "version": "8.2.0", @@ -8727,7 +8728,8 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", - "dev": true + "dev": true, + "requires": {} }, "eslint-import-resolver-node": { "version": "0.3.9", @@ -9953,7 +9955,8 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true + "dev": true, + "requires": {} }, "jest-regex-util": { "version": "28.0.2",