Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
name: Code Style
on: [pull_request]

permissions:
code-quality: write

Check warning

Code scanning / zizmor

overly broad permissions: code-quality: write is overly broad at the workflow level Warning

overly broad permissions: code-quality: write is overly broad at the workflow level
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

jobs:
phpcs:
name: phpcs
runs-on: ubuntu-latest
steps:
- name: Check out code into the workspace
uses: actions/checkout@v2
uses: actions/checkout@v6

Check failure

Code scanning / zizmor

unpinned action reference: action is not pinned to a hash (required by blanket policy) Error

unpinned action reference: action is not pinned to a hash (required by blanket policy)
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

- name: Install php
uses: shivammathur/setup-php@v2
Expand All @@ -16,29 +20,24 @@
- name: Install dependencies
run: composer update --dev --no-interaction --prefer-dist --no-progress --no-suggest --ansi

- name: PHPCS check
uses: chekalsky/phpcs-action@v1
with:
phpcs_bin_path: './vendor/bin/phpcs'
enable_warnings: true
- name: Run phpcs
run: phpcs -q --report=checkstyle src

phpstan:
name: phpstan
runs-on: ubuntu-latest
steps:
- name: Check out code into the workspace
uses: actions/checkout@v2
uses: actions/checkout@v6

Check failure

Code scanning / zizmor

unpinned action reference: action is not pinned to a hash (required by blanket policy) Error

unpinned action reference: action is not pinned to a hash (required by blanket policy)
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

- name: Install php
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
tools: phpstan

- name: Install dependencies
run: composer update --dev --no-interaction --prefer-dist --no-progress --no-suggest --ansi

- name: Require phpstan
run: composer require --dev phpstan/phpstan:"~2.1.56" --no-interaction

- name: Run phpstan
run: php ./vendor/phpstan/phpstan/phpstan.phar analyse --no-progress
run: phpstan analyse --no-progress
22 changes: 14 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,27 @@

name: Create release

permissions:
packages: write
contents: write

jobs:
build:
name: Create release
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v6

Check failure

Code scanning / zizmor

unpinned action reference: action is not pinned to a hash (required by blanket policy) Error

unpinned action reference: action is not pinned to a hash (required by blanket policy)
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
with:
ref: ${{ github.head_ref }}
- name: Replace version constant
run: |
sed -i "s/VERSION\s*=\s*[^;]*/VERSION = '${{ github.event.inputs.version }}'/g" ./src/Fpdi.php ./src/Tcpdf/Fpdi.php ./src/Tfpdf/Fpdi.php
sed -i "s/VERSION\s*=\s*[^;]*/VERSION = '${NEW_VERSION}'/g" ./src/Fpdi.php ./src/Tcpdf/Fpdi.php ./src/Tfpdf/Fpdi.php
env:
NEW_VERSION: ${{ github.event.inputs.version }}
- name: Commit and push version constant update
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v7

Check failure

Code scanning / zizmor

unpinned action reference: action is not pinned to a hash (required by blanket policy) Error

unpinned action reference: action is not pinned to a hash (required by blanket policy)
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
with:
commit_message: Updated version constant
push_options: --force
Expand All @@ -31,11 +38,10 @@
run: echo "::set-output name=sha::$(git rev-parse HEAD)"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v3

Check failure

Code scanning / zizmor

unpinned action reference: action is not pinned to a hash (required by blanket policy) Error

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check notice

Code scanning / zizmor

action functionality is already included by the runner: use gh release in a script step Note

action functionality is already included by the runner: use gh release in a script step
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
with:
commitish: ${{ steps.actual_commit_sha.outputs.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
target_commitish: ${{ steps.actual_commit_sha.outputs.sha }}
tag_name: v${{ github.event.inputs.version }}
release_name: FPDI ${{ github.event.inputs.version }}
name: FPDI ${{ github.event.inputs.version }}
draft: true
9 changes: 7 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Tests
on: [pull_request]

permissions: {}

jobs:
tests:
name: Run PHP Unit tests
Expand All @@ -9,7 +12,7 @@
php: ['7.2', '7.3']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v6

Check failure

Code scanning / zizmor

unpinned action reference: action is not pinned to a hash (required by blanket policy) Error test

unpinned action reference: action is not pinned to a hash (required by blanket policy)
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

- name: Install mupdf and imagemagick
run: sudo apt-get install mupdf-tools imagemagick
Expand All @@ -18,6 +21,7 @@
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: none

- name: Install dependencies
run: composer update --dev --no-interaction --prefer-dist --no-progress --no-suggest --ansi
Expand All @@ -34,7 +38,7 @@
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v6

Check failure

Code scanning / zizmor

unpinned action reference: action is not pinned to a hash (required by blanket policy) Error test

unpinned action reference: action is not pinned to a hash (required by blanket policy)
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

- name: Install mupdf and imagemagick
run: sudo apt-get install mupdf-tools imagemagick
Expand All @@ -43,6 +47,7 @@
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: none

- name: Upgrade phpunit
run: composer require --dev --with-all-dependencies "phpunit/phpunit=^9.0"
Expand Down
Loading