bits-to-dead-trees 2.31.0 → 2.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,8 +4,5 @@ updates:
4
4
  directory: "/"
5
5
  schedule:
6
6
  interval: "weekly"
7
-
8
- - package-ecosystem: "docker"
9
- directory: "/"
10
- schedule:
11
- interval: "weekly"
7
+ cooldown:
8
+ default-days: 7
@@ -10,35 +10,57 @@ on:
10
10
  required: true
11
11
  type: string
12
12
 
13
- concurrency: ${{ github.workflow }}-${{ github.ref }}
13
+ permissions: {}
14
+
15
+ concurrency:
16
+ group: ${{ github.workflow }}-${{ github.ref }}
17
+ cancel-in-progress: false
14
18
 
15
19
  jobs:
16
20
  build:
21
+ name: Build and push Docker image
17
22
  runs-on: ubuntu-latest
18
23
  permissions:
19
- contents: write
20
- packages: write
21
- pull-requests: write
24
+ contents: write # Required to commit README updates and push the PR branch.
25
+ packages: write # Required to publish the image to GitHub Container Registry.
26
+ pull-requests: write # Required to open or update the README pull request.
22
27
  steps:
23
28
  - name: Set tag name
24
- run: echo "TAG_NAME=${{ inputs.ref_name || github.ref_name }}" >> $GITHUB_ENV
29
+ env:
30
+ INPUT_REF_NAME: ${{ inputs.ref_name }}
31
+ RELEASE_REF_NAME: ${{ github.ref_name }}
32
+ run: |
33
+ tag_name="${INPUT_REF_NAME:-${RELEASE_REF_NAME}}"
34
+ if [ -z "${tag_name}" ]; then
35
+ echo "Unable to determine tag name" >&2
36
+ exit 1
37
+ fi
38
+
39
+ if [[ "${tag_name}" == *$'\n'* ]] || [[ "${tag_name}" == *$'\r'* ]]; then
40
+ echo "Tag name must not contain newlines" >&2
41
+ exit 1
42
+ fi
43
+
44
+ echo "TAG_NAME=${tag_name}" >> "${GITHUB_ENV}"
45
+
25
46
  - name: Checkout Repo
26
- uses: actions/checkout@v4
47
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
27
48
  with:
28
49
  ref: ${{ env.TAG_NAME }}
50
+ persist-credentials: false
29
51
 
30
52
  - name: Login to GitHub Container Registry
31
- uses: docker/login-action@v3
53
+ uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
32
54
  with:
33
55
  registry: ghcr.io
34
56
  username: ${{ github.repository_owner }}
35
57
  password: ${{ secrets.GITHUB_TOKEN }}
36
58
 
37
59
  - name: Set up Docker Buildx
38
- uses: docker/setup-buildx-action@v3
60
+ uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
39
61
 
40
62
  - name: Build and push builder image
41
- uses: docker/build-push-action@v6
63
+ uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7
42
64
  with:
43
65
  file: Dockerfile
44
66
  push: true
@@ -49,14 +71,31 @@ jobs:
49
71
 
50
72
  - name: Update version in README
51
73
  run: |
52
- sed -i 's|image: ghcr.io/rmehner/bits-to-dead-trees:v.*|image: ghcr.io/rmehner/bits-to-dead-trees:${{ env.TAG_NAME }}|' README.md
74
+ sed -i "s|image: ghcr.io/rmehner/bits-to-dead-trees:v.*|image: ghcr.io/rmehner/bits-to-dead-trees:${TAG_NAME}|" README.md
53
75
 
54
76
  - name: Create Pull Request
55
- uses: peter-evans/create-pull-request@v7
56
- with:
57
- sign-commits: true
58
- commit-message: "🤖 Update version of docker image in README to ${{ env.TAG_NAME }}"
59
- title: "🤖 Update version in README after release"
60
- base: main
61
- body: |
62
- Updates the referenced docker image version in the README to ${{ env.TAG_NAME }}
77
+ env:
78
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79
+ TAG_NAME: ${{ env.TAG_NAME }}
80
+ run: |
81
+ if [ -z "$(git status --porcelain README.md)" ]; then
82
+ exit 0
83
+ fi
84
+
85
+ branch_tag="${TAG_NAME//[^A-Za-z0-9._-]/-}"
86
+ branch_name="update-docker-image-${branch_tag}"
87
+ title="🤖 Update version in README after release"
88
+ body="Updates the referenced docker image version in the README to ${TAG_NAME}"
89
+
90
+ git config user.name "github-actions[bot]"
91
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
92
+ git checkout -B "${branch_name}"
93
+ git add README.md
94
+ git commit -m "🤖 Update version of docker image in README to ${TAG_NAME}"
95
+ git push --force-with-lease "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${branch_name}"
96
+
97
+ if gh pr view "${branch_name}" --json number --jq .number >/dev/null 2>&1; then
98
+ gh pr edit "${branch_name}" --title "${title}" --body "${body}"
99
+ else
100
+ gh pr create --base main --head "${branch_name}" --title "${title}" --body "${body}"
101
+ fi
@@ -2,19 +2,26 @@ name: Check JSON schema
2
2
 
3
3
  on: push
4
4
 
5
+ permissions: {}
6
+
5
7
  concurrency:
6
8
  group: ${{ github.workflow }}-${{ github.ref }}
7
9
  cancel-in-progress: true
8
10
 
9
11
  jobs:
10
12
  check-json-schema:
13
+ name: Check JSON schema
11
14
  runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: write # Required to commit schema updates back to the current branch.
12
17
  steps:
13
18
  - name: Checkout Repo
14
- uses: actions/checkout@v4
19
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
20
+ with:
21
+ persist-credentials: false
15
22
 
16
23
  - name: Set up Node
17
- uses: actions/setup-node@v4
24
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
18
25
  with:
19
26
  node-version-file: .node-version
20
27
  cache: npm
@@ -26,6 +33,15 @@ jobs:
26
33
  run: npm run update-schemas
27
34
 
28
35
  - name: Commit schema changes
29
- uses: stefanzweifel/git-auto-commit-action@v5
30
- with:
31
- commit_message: "🤖 Update schema to match Playwright version"
36
+ env:
37
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38
+ run: |
39
+ if [ -z "$(git status --porcelain)" ]; then
40
+ exit 0
41
+ fi
42
+
43
+ git config user.name "github-actions[bot]"
44
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
45
+ git add .
46
+ git commit -m "🤖 Update schema to match Playwright version"
47
+ git push "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF_NAME}"
@@ -2,19 +2,25 @@ name: CI
2
2
 
3
3
  on: push
4
4
 
5
+ permissions:
6
+ contents: read # Required to check out repository contents.
7
+
5
8
  concurrency:
6
9
  group: ${{ github.workflow }}-${{ github.ref }}
7
10
  cancel-in-progress: true
8
11
 
9
12
  jobs:
10
13
  ci:
14
+ name: CI
11
15
  runs-on: ubuntu-latest
12
16
  steps:
13
17
  - name: Checkout Repo
14
- uses: actions/checkout@v4
18
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
19
+ with:
20
+ persist-credentials: false
15
21
 
16
22
  - name: Set up Node
17
- uses: actions/setup-node@v4
23
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
18
24
  with:
19
25
  node-version-file: .node-version
20
26
  cache: npm
@@ -6,29 +6,55 @@ on:
6
6
  branches:
7
7
  - "depfu/update/npm/playwright-core-**"
8
8
 
9
+ permissions: {}
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
9
15
  jobs:
10
16
  sync-node-version:
17
+ name: Keep versions in sync
11
18
  runs-on: ubuntu-latest
12
19
  permissions:
13
- contents: write
20
+ contents: write # Required to commit version sync updates back to the current branch.
14
21
  steps:
15
22
  - name: Checkout Repo
16
- uses: actions/checkout@v4
23
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
17
24
  with:
18
25
  ref: ${{ github.head_ref }}
26
+ persist-credentials: false
19
27
 
20
28
  - name: Sync .node-version with the one that Playwright is using
21
29
  run: .github/bin/sync-node-version-from-playwright
22
30
 
23
- - name: Commit changes
24
- uses: stefanzweifel/git-auto-commit-action@v5
25
- with:
26
- commit_message: "🤖 Update .node-version after playwright update"
31
+ - name: Commit .node-version changes
32
+ env:
33
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34
+ run: |
35
+ if [ -z "$(git status --porcelain)" ]; then
36
+ exit 0
37
+ fi
38
+
39
+ git config user.name "github-actions[bot]"
40
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
41
+ git add .
42
+ git commit -m "🤖 Update .node-version after playwright update"
43
+ git push "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF_NAME}"
27
44
 
28
45
  - name: Sync Playwright version in dockerfile with the one from package.json
29
46
  run: .github/bin/sync-playwright-version-to-dockerfile
30
47
 
31
- - name: Commit changes
32
- uses: stefanzweifel/git-auto-commit-action@v5
33
- with:
34
- commit_message: "🤖 Update playwright-core in Dockerfile after depfu update"
48
+ - name: Commit Dockerfile changes
49
+ env:
50
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51
+ run: |
52
+ if [ -z "$(git status --porcelain)" ]; then
53
+ exit 0
54
+ fi
55
+
56
+ git config user.name "github-actions[bot]"
57
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
58
+ git add .
59
+ git commit -m "🤖 Update playwright-core in Dockerfile after depfu update"
60
+ git push "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF_NAME}"
@@ -5,27 +5,33 @@ on:
5
5
  branches:
6
6
  - main
7
7
 
8
- concurrency: ${{ github.workflow }}-${{ github.ref }}
8
+ permissions: {}
9
9
 
10
- permissions:
11
- id-token: write # Required for OIDC
12
- contents: write
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: false
13
13
 
14
14
  jobs:
15
15
  release:
16
16
  name: Release
17
17
  runs-on: ubuntu-latest
18
+ permissions:
19
+ id-token: write # Required for npm provenance/OIDC during release publishing.
20
+ contents: write # Required for Changesets to create releases and version commits.
21
+ pull-requests: write # Required for Changesets to create release pull requests.
18
22
  steps:
19
23
  - name: Checkout Repo
20
- uses: actions/checkout@v4
24
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
21
25
  with:
22
26
  # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
23
27
  fetch-depth: 0
28
+ persist-credentials: false
24
29
 
25
30
  - name: Set up Node
26
- uses: actions/setup-node@v4
31
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
27
32
  with:
28
33
  node-version-file: .node-version
34
+ registry-url: https://registry.npmjs.org
29
35
  cache: npm
30
36
 
31
37
  - name: Install Dependencies
@@ -33,10 +39,9 @@ jobs:
33
39
 
34
40
  - name: Create Release Pull Request or Publish to npm
35
41
  id: changesets
36
- uses: changesets/action@v1
42
+ uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1.9.0
37
43
  with:
38
44
  publish: npm run release
39
45
  title: Release new version 🚀
40
46
  env:
41
47
  GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
42
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -5,19 +5,27 @@ on:
5
5
  branches:
6
6
  - "depfu/update/npm/prettier-**"
7
7
 
8
+ permissions: {}
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
8
14
  jobs:
9
15
  run-prettier:
16
+ name: Run Prettier
10
17
  runs-on: ubuntu-latest
11
18
  permissions:
12
- contents: write
19
+ contents: write # Required to commit formatting updates back to the current branch.
13
20
  steps:
14
21
  - name: Checkout Repo
15
- uses: actions/checkout@v4
22
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
16
23
  with:
17
24
  ref: ${{ github.head_ref }}
25
+ persist-credentials: false
18
26
 
19
27
  - name: Set up Node
20
- uses: actions/setup-node@v4
28
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
21
29
  with:
22
30
  node-version-file: .node-version
23
31
  cache: npm
@@ -29,6 +37,15 @@ jobs:
29
37
  run: npm run format
30
38
 
31
39
  - name: Commit changes
32
- uses: stefanzweifel/git-auto-commit-action@v5
33
- with:
34
- commit_message: "🤖 Ran prettier after prettier update"
40
+ env:
41
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42
+ run: |
43
+ if [ -z "$(git status --porcelain)" ]; then
44
+ exit 0
45
+ fi
46
+
47
+ git config user.name "github-actions[bot]"
48
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
49
+ git add .
50
+ git commit -m "🤖 Ran prettier after prettier update"
51
+ git push "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF_NAME}"
@@ -0,0 +1,36 @@
1
+ name: Zizmor
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - ".github/**.yml"
9
+
10
+ pull_request:
11
+ paths:
12
+ - ".github/**.yml"
13
+
14
+ concurrency:
15
+ group: ${{ github.workflow }}-${{ github.ref }}
16
+ cancel-in-progress: true
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ jobs:
22
+ zizmor:
23
+ name: Run zizmor
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - name: Checkout repository
27
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
28
+ with:
29
+ persist-credentials: false
30
+
31
+ - name: Run zizmor
32
+ uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6
33
+ with:
34
+ advanced-security: false
35
+ annotations: true
36
+ persona: "pedantic"
package/.node-version CHANGED
@@ -1 +1 @@
1
- 24.15.0
1
+ 24.16.0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # bits-to-dead-trees
2
2
 
3
+ ## 2.32.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#669](https://github.com/rmehner/bits-to-dead-trees/pull/669) [`f22459a`](https://github.com/rmehner/bits-to-dead-trees/commit/f22459a9674c81ed9748a2c9d18ddb3b6f18a3cb) Thanks [@depfu](https://github.com/apps/depfu)! - Upgrade to Playwright 1.61.0
8
+
9
+ ## 2.31.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#654](https://github.com/rmehner/bits-to-dead-trees/pull/654) [`759a948`](https://github.com/rmehner/bits-to-dead-trees/commit/759a948c4e4980d2c6967e518f90646dc5dab59f) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update docker to use playwright 1.60.0 as well
14
+
3
15
  ## 2.31.0
4
16
 
5
17
  ### Minor Changes
package/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM mcr.microsoft.com/playwright:v1.58.2
1
+ FROM mcr.microsoft.com/playwright:v1.61.0
2
2
 
3
3
  ENV NODE_ENV=production
4
4
  ENV PORT=8000
package/README.md CHANGED
@@ -57,7 +57,7 @@ If you want to use it internally with docker-compose, this should give you a goo
57
57
  ```yml
58
58
  services:
59
59
  pdf:
60
- image: ghcr.io/rmehner/bits-to-dead-trees:v2.30.1
60
+ image: ghcr.io/rmehner/bits-to-dead-trees:v2.31.1
61
61
  ports:
62
62
  - 8000:8000
63
63
  ```
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "bits-to-dead-trees",
3
3
  "author": "Robin Mehner <robin@coding-robin.de>",
4
- "version": "2.31.0",
4
+ "version": "2.32.0",
5
5
  "description": "Turn HTML into PDF files",
6
- "repository": "github:rmehner/bits-to-dead-trees",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/rmehner/bits-to-dead-trees.git"
9
+ },
7
10
  "license": "Apache-2.0",
8
11
  "keywords": [
9
12
  "html",
@@ -31,23 +34,23 @@
31
34
  },
32
35
  "dependencies": {
33
36
  "fastify": "^5.8.5",
34
- "playwright-core": "^1.60.0"
37
+ "playwright-core": "^1.61.0"
35
38
  },
36
39
  "devDependencies": {
37
- "@changesets/changelog-github": "^0.6.0",
40
+ "@changesets/changelog-github": "^0.7.0",
38
41
  "@changesets/cli": "^2.31.0",
39
- "@eslint/js": "^9.39.4",
42
+ "@eslint/js": "^10.0.1",
40
43
  "@tsconfig/node24": "^24.0.4",
41
44
  "@types/lodash": "^4.17.24",
42
45
  "@types/node": "24.12.0",
43
- "eslint": "^9.39.4",
46
+ "eslint": "^10.4.1",
44
47
  "eslint-config-prettier": "^10.1.8",
45
- "eslint-plugin-n": "^17.24.0",
48
+ "eslint-plugin-n": "^18.1.0",
46
49
  "eslint-plugin-promise": "^7.3.0",
47
50
  "globals": "^17.6.0",
48
51
  "pino-pretty": "^13.1.3",
49
- "prettier": "^3.8.3",
52
+ "prettier": "^3.8.4",
50
53
  "typescript-json-schema": "^0.67.4",
51
- "vitest": "^4.1.5"
54
+ "vitest": "^4.1.8"
52
55
  }
53
56
  }