From 713fef34cb4e9761060f4a21aa6e17a402342b60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 09:08:06 +0000 Subject: [PATCH 1/2] Bump super-linter/super-linter from 6 to 8 Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 6 to 8. - [Release notes](https://github.com/super-linter/super-linter/releases) - [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md) - [Commits](https://github.com/super-linter/super-linter/compare/v6...v8) --- updated-dependencies: - dependency-name: super-linter/super-linter dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 99f23344..f4db5862 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -38,7 +38,7 @@ jobs: - name: Lint Code Base id: super-linter - uses: super-linter/super-linter/slim@v6 + uses: super-linter/super-linter/slim@v8 env: DEFAULT_BRANCH: main GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 4951e30cd9a5d71344db7c973f3be86d85c4abb9 Mon Sep 17 00:00:00 2001 From: "gstraccini[bot]" <150967461+gstraccini[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 09:12:18 +0000 Subject: [PATCH 2/2] Prettier format --- .github/dependabot.yml | 58 +++++++++++++++---------------- .github/linters/.yaml-lint.yml | 2 +- .github/linters/eslint.config.mjs | 8 ++--- .github/linters/tsconfig.json | 14 ++------ .github/workflows/ci.yml | 9 ++--- .github/workflows/codeql.yml | 2 +- .github/workflows/size-label.yml | 5 ++- .prettierrc.json | 2 +- .vscode/settings.json | 10 +++--- README.md | 42 +++++++++++++--------- _config.yml | 4 +-- package-lock.json | 1 + tsconfig.json | 2 +- 13 files changed, 80 insertions(+), 79 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e4c407ff..8cb4d2fa 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,33 +1,33 @@ version: 2 updates: -- package-ecosystem: "npm" - directory: "/" - schedule: - interval: weekly - open-pull-requests-limit: 50 - assignees: - - "guibranco" - reviewers: - - "guibranco" - labels: - - "npm" - - "javascript" - - "dependencies" - groups: - TSESLint: - patterns: - - "*typescript-eslint*" + - package-ecosystem: 'npm' + directory: '/' + schedule: + interval: weekly + open-pull-requests-limit: 50 + assignees: + - 'guibranco' + reviewers: + - 'guibranco' + labels: + - 'npm' + - 'javascript' + - 'dependencies' + groups: + TSESLint: + patterns: + - '*typescript-eslint*' -- package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: weekly - open-pull-requests-limit: 50 - assignees: - - "guibranco" - reviewers: - - "guibranco" - labels: - - "github-actions" - - "dependencies" + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + interval: weekly + open-pull-requests-limit: 50 + assignees: + - 'guibranco' + reviewers: + - 'guibranco' + labels: + - 'github-actions' + - 'dependencies' diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml index d2813490..c975a332 100644 --- a/.github/linters/.yaml-lint.yml +++ b/.github/linters/.yaml-lint.yml @@ -7,4 +7,4 @@ rules: level: warning max: 80 allow-non-breakable-words: true - allow-non-breakable-inline-mappings: true \ No newline at end of file + allow-non-breakable-inline-mappings: true diff --git a/.github/linters/eslint.config.mjs b/.github/linters/eslint.config.mjs index 6aab060b..ea54f2e3 100644 --- a/.github/linters/eslint.config.mjs +++ b/.github/linters/eslint.config.mjs @@ -1,6 +1,6 @@ import jest from 'eslint-plugin-jest' -import githubPlugin from 'eslint-plugin-github'; -import prettierPlugin from 'eslint-plugin-prettier'; +import githubPlugin from 'eslint-plugin-github' +import prettierPlugin from 'eslint-plugin-prettier' import typescriptEslint from '@typescript-eslint/eslint-plugin' import globals from 'globals' import tsParser from '@typescript-eslint/parser' @@ -33,7 +33,7 @@ export default [ 'eslint:recommended', 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', - 'plugin:jest/recommended', + 'plugin:jest/recommended' ), { plugins: { @@ -47,7 +47,7 @@ export default [ ...globals.jest, Atomics: 'readonly', SharedArrayBuffer: 'readonly', - BufferEncoding: 'readonly', + BufferEncoding: 'readonly' }, parser: tsParser, diff --git a/.github/linters/tsconfig.json b/.github/linters/tsconfig.json index f4ddf1fa..a34cf901 100644 --- a/.github/linters/tsconfig.json +++ b/.github/linters/tsconfig.json @@ -4,14 +4,6 @@ "compilerOptions": { "noEmit": true }, - "include": [ - "../../__tests__/**/*", - "../../src/**/*" - ], - "exclude": [ - "../../dist", - "../../node_modules", - "../../coverage", - "*.json" - ] -} \ No newline at end of file + "include": ["../../__tests__/**/*", "../../src/**/*"], + "exclude": ["../../dist", "../../node_modules", "../../coverage", "*.json"] +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c82e37cb..1f72eabb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: id: test-action uses: ./ with: - path: "README.md" + path: 'README.md' - name: Print Output id: output @@ -67,7 +67,6 @@ jobs: runs-on: ubuntu-latest if: github.event_name != 'pull_request' steps: - - name: Checkout uses: actions/checkout@v4 with: @@ -76,7 +75,7 @@ jobs: - name: Install GitVersion uses: gittools/actions/gitversion/setup@v4 with: - versionSpec: "6.x" + versionSpec: '6.x' - name: Determine Version id: gitversion @@ -92,4 +91,6 @@ jobs: tag: v${{ steps.gitversion.outputs.semVer }} name: Release v${{ steps.gitversion.outputs.semVer }} generateReleaseNotes: true - body: Release ${{ steps.gitversion.outputs.semVer }} of ${{ github.event.repository.name }} + body: + Release ${{ steps.gitversion.outputs.semVer }} of ${{ + github.event.repository.name }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index efa701dd..6ad7cb67 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -45,4 +45,4 @@ jobs: - name: Perform CodeQL Analysis id: analyze - uses: github/codeql-action/analyze@v3 \ No newline at end of file + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/size-label.yml b/.github/workflows/size-label.yml index da8f48cd..258a1784 100644 --- a/.github/workflows/size-label.yml +++ b/.github/workflows/size-label.yml @@ -14,8 +14,7 @@ jobs: pull-requests: write steps: - - name: size-label - uses: "pascalgn/size-label-action@v0.5.5" + uses: 'pascalgn/size-label-action@v0.5.5' env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' diff --git a/.prettierrc.json b/.prettierrc.json index 79333bb5..a3781469 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -13,4 +13,4 @@ "proseWrap": "always", "htmlWhitespaceSensitivity": "css", "endOfLine": "lf" -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 8228f894..6df8c5fe 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { - "sonarlint.connectedMode.project": { - "connectionId": "guibranco", - "projectKey": "guibranco_github-file-reader-action-v2" - } -} \ No newline at end of file + "sonarlint.connectedMode.project": { + "connectionId": "guibranco", + "projectKey": "guibranco_github-file-reader-action-v2" + } +} diff --git a/README.md b/README.md index 8ee973eb..d6835d1f 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # GitHub File Reader Action V2 -[![GitHub repo](https://img.shields.io/badge/GitHub-guibranco%2Fgithub--file--reader--action--v2-green.svg?style=plastic&logo=github)](https://github.com/guibranco/github-file-reader-action-v2 "shields.io") -[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/guibranco/github-file-reader-action-v2?color=green&label=Code%20size&style=plastic&logo=github)](https://github.com/guibranco/github-file-reader-action-v2 "shields.io") -[![GitHub last commit](https://img.shields.io/github/last-commit/guibranco/github-file-reader-action-v2?color=green&logo=github&style=plastic&label=Last%20commit)](https://github.com/guibranco/github-file-reader-action-v2 "shields.io") -[![GitHub license](https://img.shields.io/github/license/guibranco/github-file-reader-action-v2?color=green&logo=github&style=plastic&label=License)](https://github.com/guibranco/github-file-reader-action-v2 "shields.io") +[![GitHub repo](https://img.shields.io/badge/GitHub-guibranco%2Fgithub--file--reader--action--v2-green.svg?style=plastic&logo=github)](https://github.com/guibranco/github-file-reader-action-v2 'shields.io') +[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/guibranco/github-file-reader-action-v2?color=green&label=Code%20size&style=plastic&logo=github)](https://github.com/guibranco/github-file-reader-action-v2 'shields.io') +[![GitHub last commit](https://img.shields.io/github/last-commit/guibranco/github-file-reader-action-v2?color=green&logo=github&style=plastic&label=Last%20commit)](https://github.com/guibranco/github-file-reader-action-v2 'shields.io') +[![GitHub license](https://img.shields.io/github/license/guibranco/github-file-reader-action-v2?color=green&logo=github&style=plastic&label=License)](https://github.com/guibranco/github-file-reader-action-v2 'shields.io') ![Check Dist](https://github.com/guibranco/github-file-reader-action-v2/actions/workflows/check-dist.yml/badge.svg) ![CI](https://github.com/guibranco/github-file-reader-action-v2/actions/workflows/ci.yml/badge.svg) @@ -15,30 +15,36 @@ GitHub Action to read the contents of a file > [!Important] > -> **Disclaimer:** This version was created because the creator has not updated the [original (V1)](https://github.com/andstor/file-reader-action) for a while. +> **Disclaimer:** This version was created because the creator has not updated +> the [original (V1)](https://github.com/andstor/file-reader-action) for a +> while. -This is a GitHub Action that reads a file's contents. If you give it a path to a file, it will provide its contents and file size, accessible through an output variable. +This is a GitHub Action that reads a file's contents. If you give it a path to a +file, it will provide its contents and file size, accessible through an output +variable. ## Usage -The following example [workflow step](https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow) will read the contents of the `package.json` file. +The following example +[workflow step](https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow) +will read the contents of the `package.json` file. ```yml -- name: "Read file contents" +- name: 'Read file contents' uses: guibranco/github-file-reader-action-v2@latest id: read_file with: - path: "package.json" + path: 'package.json' ``` ## Options ⚙️ The following input variable options can/must be configured: -|Input variable|Necessity|Description|Default| -|----|----|----|----| -|`path`|Required|the path to the file to read.|| -|`encoding`|Optional|the encoding of the file to read.|`utf8`| +| Input variable | Necessity | Description | Default | +| -------------- | --------- | --------------------------------- | ------- | +| `path` | Required | the path to the file to read. | | +| `encoding` | Optional | the encoding of the file to read. | `utf8` | ## Outputs @@ -48,7 +54,7 @@ The following input variable options can/must be configured: ## Example ```yml -name: "Read file contents" +name: 'Read file contents' on: [push, pull_request] @@ -63,7 +69,7 @@ jobs: uses: guibranco/github-file-reader-action-v2@latest id: read_file with: - path: "package.json" + path: 'package.json' - name: File contents run: echo "${ steps.read_file.outputs.contents }" @@ -74,6 +80,8 @@ jobs: ## License -Copyright © 2024 [André Storhaug](https://github.com/andstor), [GuiBranco](https://github.com/guibranco). +Copyright © 2024 [André Storhaug](https://github.com/andstor), +[GuiBranco](https://github.com/guibranco). -file-reader-action-v2 is licensed under the [MIT License](https://github.com/guibranco/github-file-reader-action-v2/blob/main/LICENSE). +file-reader-action-v2 is licensed under the +[MIT License](https://github.com/guibranco/github-file-reader-action-v2/blob/main/LICENSE). diff --git a/_config.yml b/_config.yml index 7e08b0e2..2566b75e 100644 --- a/_config.yml +++ b/_config.yml @@ -1,4 +1,4 @@ theme: jekyll-theme-cayman -title: "📄 :octocat: GitHub Action to read the contents of a file" -description: "GitHub Action to read the contents of a file." +title: '📄 :octocat: GitHub Action to read the contents of a file' +description: 'GitHub Action to read the contents of a file.' show_downloads: true diff --git a/package-lock.json b/package-lock.json index a87273f5..360e20af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7422,6 +7422,7 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, diff --git a/tsconfig.json b/tsconfig.json index 95892a44..2f26aac7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,4 +16,4 @@ "newLine": "lf" }, "exclude": ["./dist", "./node_modules", "./__tests__", "./coverage"] -} \ No newline at end of file +}