From 5c58e7dce57406d082625b730c7050899f0823f4 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 8 Aug 2025 16:29:36 -0300 Subject: [PATCH 01/31] dummy change --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 574b37a2..c2824a10 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "resend", + "name": "gabrielmfern-resend", "version": "6.0.1", "description": "Node.js library for the Resend API", "main": "./dist/index.js", From 239b66783b8d951894b6d12b56786d090f076eba Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 8 Aug 2025 16:31:54 -0300 Subject: [PATCH 02/31] try removing credentails --- .github/workflows/lint.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3c9fa0b2..9664bf05 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,9 +9,6 @@ jobs: runs-on: buildjet-4vcpu-ubuntu-2204 container: image: node:20 - credentials: - username: "${{ vars.DOCKER_HUB_USERNAME }}" - password: "${{ secrets.DOCKER_HUB_API_KEY }}" steps: - name: Checkout uses: actions/checkout@v4 From 13413a706ccd2bac63ca277611e5ac4c31bf91ff Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 8 Aug 2025 16:33:19 -0300 Subject: [PATCH 03/31] try empty credential fields --- .github/workflows/lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9664bf05..c344cae6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,6 +9,9 @@ jobs: runs-on: buildjet-4vcpu-ubuntu-2204 container: image: node:20 + credentials: + username: + password: steps: - name: Checkout uses: actions/checkout@v4 From cb77fa4c8f4e414a856b5ae207dd8b40d6330b2a Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 8 Aug 2025 16:34:36 -0300 Subject: [PATCH 04/31] use empty strings --- .github/workflows/lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c344cae6..f75168d4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,8 +10,8 @@ jobs: container: image: node:20 credentials: - username: - password: + username: "" + password: "" steps: - name: Checkout uses: actions/checkout@v4 From cbc5424e756843728d3f10485fd8da9f9faaae5f Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 8 Aug 2025 16:38:37 -0300 Subject: [PATCH 05/31] try to interpolate credentials in --- .github/workflows/lint.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f75168d4..92012f40 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,9 +9,12 @@ jobs: runs-on: buildjet-4vcpu-ubuntu-2204 container: image: node:20 - credentials: - username: "" - password: "" + ${{ secrets.DOCKER_HUB_API_KEY && format('credentials: + username: {0} + password: {1}', + vars.DOCKER_HUB_USERNAME, + secrets.DOCKER_HUB_API_KEY + ) || ""}} steps: - name: Checkout uses: actions/checkout@v4 From b97dfc701136d4d53deed380ae6b65e6f045f079 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 8 Aug 2025 16:42:46 -0300 Subject: [PATCH 06/31] interpolat inline --- .github/workflows/lint.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 92012f40..fb12ce0a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,12 +9,7 @@ jobs: runs-on: buildjet-4vcpu-ubuntu-2204 container: image: node:20 - ${{ secrets.DOCKER_HUB_API_KEY && format('credentials: - username: {0} - password: {1}', - vars.DOCKER_HUB_USERNAME, - secrets.DOCKER_HUB_API_KEY - ) || ""}} + credentials: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('username: {0}, password: {1}', vars.DOCKER_HUB_USERNAME, secrets.DOCKER_HUB_API_KEY) }} steps: - name: Checkout uses: actions/checkout@v4 From bf0faaa9b78b707ae6771e172c567ab7b0f59880 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 8 Aug 2025 16:44:22 -0300 Subject: [PATCH 07/31] try to interpolate in tests? --- .github/workflows/tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 926d4511..f979e17e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,9 +9,7 @@ jobs: runs-on: buildjet-4vcpu-ubuntu-2204 container: image: node:20 - credentials: - username: "${{ vars.DOCKER_HUB_USERNAME }}" - password: "${{ secrets.DOCKER_HUB_API_KEY }}" + credentials: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('username: {0}, password: {1}', vars.DOCKER_HUB_USERNAME, secrets.DOCKER_HUB_API_KEY) }} steps: - name: Checkout uses: actions/checkout@v4 From 2d7677d75a756cff795406170ff13e3dafb20b7c Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 8 Aug 2025 16:45:21 -0300 Subject: [PATCH 08/31] Revert "try to interpolate in tests?" This reverts commit bf0faaa9b78b707ae6771e172c567ab7b0f59880. --- .github/workflows/tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f979e17e..926d4511 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,9 @@ jobs: runs-on: buildjet-4vcpu-ubuntu-2204 container: image: node:20 - credentials: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('username: {0}, password: {1}', vars.DOCKER_HUB_USERNAME, secrets.DOCKER_HUB_API_KEY) }} + credentials: + username: "${{ vars.DOCKER_HUB_USERNAME }}" + password: "${{ secrets.DOCKER_HUB_API_KEY }}" steps: - name: Checkout uses: actions/checkout@v4 From 346a7128b59f2c67bd4f353a1552974f679d13d4 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 8 Aug 2025 16:45:31 -0300 Subject: [PATCH 09/31] try to format values in quotes --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fb12ce0a..9e920ab7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,7 @@ jobs: runs-on: buildjet-4vcpu-ubuntu-2204 container: image: node:20 - credentials: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('username: {0}, password: {1}', vars.DOCKER_HUB_USERNAME, secrets.DOCKER_HUB_API_KEY) }} + credentials: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('username:"{0}",password:"{1}"', vars.DOCKER_HUB_USERNAME, secrets.DOCKER_HUB_API_KEY) }} steps: - name: Checkout uses: actions/checkout@v4 From d4df6c2c5a3875e364715ce3d82739f7be017fe2 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 8 Aug 2025 16:46:38 -0300 Subject: [PATCH 10/31] try to interpolate all of credentials --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9e920ab7..d707cbe5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,7 @@ jobs: runs-on: buildjet-4vcpu-ubuntu-2204 container: image: node:20 - credentials: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('username:"{0}",password:"{1}"', vars.DOCKER_HUB_USERNAME, secrets.DOCKER_HUB_API_KEY) }} + ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('credentials:username:"{0}",password:"{1}"', vars.DOCKER_HUB_USERNAME, secrets.DOCKER_HUB_API_KEY) }} steps: - name: Checkout uses: actions/checkout@v4 From 21d89b63cb50e4186e45d0a56a5188910a92cfdb Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 8 Aug 2025 17:24:44 -0300 Subject: [PATCH 11/31] try credentials out again --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d707cbe5..9e920ab7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,7 @@ jobs: runs-on: buildjet-4vcpu-ubuntu-2204 container: image: node:20 - ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('credentials:username:"{0}",password:"{1}"', vars.DOCKER_HUB_USERNAME, secrets.DOCKER_HUB_API_KEY) }} + credentials: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('username:"{0}",password:"{1}"', vars.DOCKER_HUB_USERNAME, secrets.DOCKER_HUB_API_KEY) }} steps: - name: Checkout uses: actions/checkout@v4 From 4bcc7f4edfd703c23c852f784ecbcda8b177fb1e Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 10:05:37 -0300 Subject: [PATCH 12/31] use different syntax --- .github/workflows/lint.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9e920ab7..1053971c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,10 @@ jobs: runs-on: buildjet-4vcpu-ubuntu-2204 container: image: node:20 - credentials: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('username:"{0}",password:"{1}"', vars.DOCKER_HUB_USERNAME, secrets.DOCKER_HUB_API_KEY) }} + ${{ if vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY }}: + credentials: + username: ${{ vars.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_API_KEY }} steps: - name: Checkout uses: actions/checkout@v4 From 5e520f7624dd575d6906e0ba8adfe7897b07950b Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 10:06:42 -0300 Subject: [PATCH 13/31] try another syntax --- .github/workflows/lint.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1053971c..4fa118b5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,10 +9,7 @@ jobs: runs-on: buildjet-4vcpu-ubuntu-2204 container: image: node:20 - ${{ if vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY }}: - credentials: - username: ${{ vars.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_API_KEY }} + credentials: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('username={0}', vars.DOCKER_HUB_USERNAME) && format('password={0}', secrets.DOCKER_HUB_API_KEY) && fromJSON('{"username":"' + vars.DOCKER_HUB_USERNAME + '","password":"' + secrets.DOCKER_HUB_API_KEY + '"}') || null }} steps: - name: Checkout uses: actions/checkout@v4 From 04a152de0340022e8bb197b8c6b960f7f658e947 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 10:30:56 -0300 Subject: [PATCH 14/31] use github container registry --- .github/workflows/lint.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4fa118b5..799dd874 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,8 +8,7 @@ jobs: lint: runs-on: buildjet-4vcpu-ubuntu-2204 container: - image: node:20 - credentials: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('username={0}', vars.DOCKER_HUB_USERNAME) && format('password={0}', secrets.DOCKER_HUB_API_KEY) && fromJSON('{"username":"' + vars.DOCKER_HUB_USERNAME + '","password":"' + secrets.DOCKER_HUB_API_KEY + '"}') || null }} + image: ghcr.io/library/node:20 steps: - name: Checkout uses: actions/checkout@v4 From bbee41bab4bd63f044c84b88ecdf9badceae0f46 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 10:34:29 -0300 Subject: [PATCH 15/31] try using a matrix strategy --- .github/workflows/lint.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 799dd874..74ccf781 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,9 +6,21 @@ on: pull_request: jobs: lint: + strategy: + matrix: + include: + - container: + image: node:20 + credentials: + username: ${{ vars.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_API_KEY }} + condition: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY }} + - container: + image: node:20 + condition: ${{ !vars.DOCKER_HUB_USERNAME || !secrets.DOCKER_HUB_API_KEY }} runs-on: buildjet-4vcpu-ubuntu-2204 - container: - image: ghcr.io/library/node:20 + if: ${{ matrix.condition }} + container: ${{ matrix.container }} steps: - name: Checkout uses: actions/checkout@v4 From 01972cbaac0138179000027184fb0ddbb2c4c3d7 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 10:47:20 -0300 Subject: [PATCH 16/31] Revert "try using a matrix strategy" This reverts commit bbee41bab4bd63f044c84b88ecdf9badceae0f46. --- .github/workflows/lint.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 74ccf781..799dd874 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,21 +6,9 @@ on: pull_request: jobs: lint: - strategy: - matrix: - include: - - container: - image: node:20 - credentials: - username: ${{ vars.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_API_KEY }} - condition: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY }} - - container: - image: node:20 - condition: ${{ !vars.DOCKER_HUB_USERNAME || !secrets.DOCKER_HUB_API_KEY }} runs-on: buildjet-4vcpu-ubuntu-2204 - if: ${{ matrix.condition }} - container: ${{ matrix.container }} + container: + image: ghcr.io/library/node:20 steps: - name: Checkout uses: actions/checkout@v4 From 5d4f9031efdca39a4284a10ced0f347917614752 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 10:47:26 -0300 Subject: [PATCH 17/31] Revert "use github container registry" This reverts commit 04a152de0340022e8bb197b8c6b960f7f658e947. --- .github/workflows/lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 799dd874..4fa118b5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,8 @@ jobs: lint: runs-on: buildjet-4vcpu-ubuntu-2204 container: - image: ghcr.io/library/node:20 + image: node:20 + credentials: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('username={0}', vars.DOCKER_HUB_USERNAME) && format('password={0}', secrets.DOCKER_HUB_API_KEY) && fromJSON('{"username":"' + vars.DOCKER_HUB_USERNAME + '","password":"' + secrets.DOCKER_HUB_API_KEY + '"}') || null }} steps: - name: Checkout uses: actions/checkout@v4 From e7570ab7dcd306212d7ea69cce54be467ed03b64 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 10:47:31 -0300 Subject: [PATCH 18/31] Revert "try another syntax" This reverts commit 5e520f7624dd575d6906e0ba8adfe7897b07950b. --- .github/workflows/lint.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4fa118b5..1053971c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,10 @@ jobs: runs-on: buildjet-4vcpu-ubuntu-2204 container: image: node:20 - credentials: ${{ vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY && format('username={0}', vars.DOCKER_HUB_USERNAME) && format('password={0}', secrets.DOCKER_HUB_API_KEY) && fromJSON('{"username":"' + vars.DOCKER_HUB_USERNAME + '","password":"' + secrets.DOCKER_HUB_API_KEY + '"}') || null }} + ${{ if vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY }}: + credentials: + username: ${{ vars.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_API_KEY }} steps: - name: Checkout uses: actions/checkout@v4 From dc02d0de1646f32a73885341f80c54050ed9fc46 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 10:57:30 -0300 Subject: [PATCH 19/31] add a separate workflow for fork --- .github/workflows/lint-forks.yml | 25 +++++++++++++++++++++++++ .github/workflows/lint.yml | 8 ++++---- 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/lint-forks.yml diff --git a/.github/workflows/lint-forks.yml b/.github/workflows/lint-forks.yml new file mode 100644 index 00000000..d496d571 --- /dev/null +++ b/.github/workflows/lint-forks.yml @@ -0,0 +1,25 @@ +name: Lint +on: + pull_request: +jobs: + lint: + if: github.event.pull_request.head.repo.fork == true + runs-on: buildjet-4vcpu-ubuntu-2204 + container: + image: node:20 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: pnpm setup + uses: pnpm/action-setup@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "pnpm" + - name: Install packages + run: pnpm install + - name: Run Lint + run: pnpm lint + env: + SKIP_ENV_VALIDATION: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1053971c..c16eec50 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,12 +7,12 @@ on: jobs: lint: runs-on: buildjet-4vcpu-ubuntu-2204 + if: github.event.pull_request.head.repo.fork == false container: image: node:20 - ${{ if vars.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_API_KEY }}: - credentials: - username: ${{ vars.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_API_KEY }} + credentials: + username: ${{ vars.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_API_KEY }} steps: - name: Checkout uses: actions/checkout@v4 From 8c236bac1afbfd670de4b3feff2a2cdd674d2b80 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 10:59:51 -0300 Subject: [PATCH 20/31] try something --- .github/workflows/lint-forks.yml | 3 +++ .github/workflows/lint.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/lint-forks.yml b/.github/workflows/lint-forks.yml index d496d571..0a8fe6d7 100644 --- a/.github/workflows/lint-forks.yml +++ b/.github/workflows/lint-forks.yml @@ -1,6 +1,9 @@ name: Lint on: pull_request: + head: + repo: + fork: true jobs: lint: if: github.event.pull_request.head.repo.fork == true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c16eec50..e9249c57 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,6 +4,9 @@ on: branches: - main pull_request: + head: + repo: + fork: false jobs: lint: runs-on: buildjet-4vcpu-ubuntu-2204 From 04b6c40bbbf22920edbab0c3bdc4463d06ecf5d3 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 11:09:55 -0300 Subject: [PATCH 21/31] add fork variants for all workflows --- .github/workflows/lint-forks.yml | 5 +- .../pin-dependencies-check-forks.yml | 48 +++++++++++++++++++ .github/workflows/pin-dependencies-check.yml | 1 + .github/workflows/pr-title-check-forks.yml | 19 ++++++++ .github/workflows/pr-title-check.yml | 1 + .github/workflows/tests-forks.yml | 33 +++++++++++++ .github/workflows/tests.yml | 1 + 7 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/pin-dependencies-check-forks.yml create mode 100644 .github/workflows/pr-title-check-forks.yml create mode 100644 .github/workflows/tests-forks.yml diff --git a/.github/workflows/lint-forks.yml b/.github/workflows/lint-forks.yml index 0a8fe6d7..58490f21 100644 --- a/.github/workflows/lint-forks.yml +++ b/.github/workflows/lint-forks.yml @@ -1,9 +1,6 @@ -name: Lint +name: Lint (forks) on: pull_request: - head: - repo: - fork: true jobs: lint: if: github.event.pull_request.head.repo.fork == true diff --git a/.github/workflows/pin-dependencies-check-forks.yml b/.github/workflows/pin-dependencies-check-forks.yml new file mode 100644 index 00000000..dcd33ca4 --- /dev/null +++ b/.github/workflows/pin-dependencies-check-forks.yml @@ -0,0 +1,48 @@ +name: Pin Dependencies Check (forks) +on: + push: + branches: + - main + pull_request: +jobs: + pin-dependencies-check: + runs-on: buildjet-4vcpu-ubuntu-2204 + if: github.event.pull_request.head.repo.fork == true + container: + image: node:20 + credentials: + username: "${{ vars.DOCKER_HUB_USERNAME }}" + password: "${{ secrets.DOCKER_HUB_API_KEY }}" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Check for pinned dependencies + run: | + node -e ' + const fs = require("fs"); + const pkg = JSON.parse(fs.readFileSync("package.json", "utf8")); + const errors = []; + + function isPinned(version) { + return /^\d+\.\d+\.\d+(-canary\.\d+)?$/.test(version); + } + + for (const [dep, version] of Object.entries(pkg.dependencies || {})) { + if (!isPinned(version)) { + errors.push(`Dependency "${dep}" is not pinned: "${version}"`); + } + } + + for (const [dep, version] of Object.entries(pkg.devDependencies || {})) { + if (!isPinned(version)) { + errors.push(`Dev dependency "${dep}" is not pinned: "${version}"`); + } + } + + if (errors.length > 0) { + console.error(`\n${errors.join("\n")}\n`); + process.exit(1); + } else { + console.log("All dependencies are pinned."); + } + ' diff --git a/.github/workflows/pin-dependencies-check.yml b/.github/workflows/pin-dependencies-check.yml index 2f6d3b0e..f0375f36 100644 --- a/.github/workflows/pin-dependencies-check.yml +++ b/.github/workflows/pin-dependencies-check.yml @@ -7,6 +7,7 @@ on: jobs: pin-dependencies-check: runs-on: buildjet-4vcpu-ubuntu-2204 + if: github.event.pull_request.head.repo.fork == false container: image: node:20 credentials: diff --git a/.github/workflows/pr-title-check-forks.yml b/.github/workflows/pr-title-check-forks.yml new file mode 100644 index 00000000..1ffa74d4 --- /dev/null +++ b/.github/workflows/pr-title-check-forks.yml @@ -0,0 +1,19 @@ +name: PR Title Check (forks) +on: + pull_request: + types: [opened, edited, synchronize] +jobs: + pr-title-check: + runs-on: buildjet-4vcpu-ubuntu-2204 + if: github.event.pull_request.head.repo.fork == true + container: + image: node:20 + credentials: + username: "${{ vars.DOCKER_HUB_USERNAME }}" + password: "${{ secrets.DOCKER_HUB_API_KEY }}" + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Run PR title check + run: | + node .github/scripts/pr-title-check.js diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml index 9db5c2f1..37008c4f 100644 --- a/.github/workflows/pr-title-check.yml +++ b/.github/workflows/pr-title-check.yml @@ -5,6 +5,7 @@ on: jobs: pr-title-check: runs-on: buildjet-4vcpu-ubuntu-2204 + if: github.event.pull_request.head.repo.fork == false container: image: node:20 credentials: diff --git a/.github/workflows/tests-forks.yml b/.github/workflows/tests-forks.yml new file mode 100644 index 00000000..3cc7106e --- /dev/null +++ b/.github/workflows/tests-forks.yml @@ -0,0 +1,33 @@ +name: Tests (forks) +on: + push: + branches: + - main + pull_request: +jobs: + tests: + runs-on: buildjet-4vcpu-ubuntu-2204 + if: github.event.pull_request.head.repo.fork == true + container: + image: node:20 + credentials: + username: "${{ vars.DOCKER_HUB_USERNAME }}" + password: "${{ secrets.DOCKER_HUB_API_KEY }}" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: pnpm setup + uses: pnpm/action-setup@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "pnpm" + - name: Install Doppler CLI + uses: dopplerhq/cli-action@v3 + - name: Install packages + run: pnpm install + - name: Run Tests + run: pnpm test + env: + SKIP_ENV_VALIDATION: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 926d4511..02110871 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,6 +7,7 @@ on: jobs: tests: runs-on: buildjet-4vcpu-ubuntu-2204 + if: github.event.pull_request.head.repo.fork == false container: image: node:20 credentials: From cbc4e857ef04e97a2e0156384ef2f283626f23be Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 11:10:46 -0300 Subject: [PATCH 22/31] remove credentials from forks variamts --- .github/workflows/pin-dependencies-check-forks.yml | 3 --- .github/workflows/pr-title-check-forks.yml | 3 --- .github/workflows/tests-forks.yml | 3 --- 3 files changed, 9 deletions(-) diff --git a/.github/workflows/pin-dependencies-check-forks.yml b/.github/workflows/pin-dependencies-check-forks.yml index dcd33ca4..cd610ccf 100644 --- a/.github/workflows/pin-dependencies-check-forks.yml +++ b/.github/workflows/pin-dependencies-check-forks.yml @@ -10,9 +10,6 @@ jobs: if: github.event.pull_request.head.repo.fork == true container: image: node:20 - credentials: - username: "${{ vars.DOCKER_HUB_USERNAME }}" - password: "${{ secrets.DOCKER_HUB_API_KEY }}" steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/pr-title-check-forks.yml b/.github/workflows/pr-title-check-forks.yml index 1ffa74d4..83293e2b 100644 --- a/.github/workflows/pr-title-check-forks.yml +++ b/.github/workflows/pr-title-check-forks.yml @@ -8,9 +8,6 @@ jobs: if: github.event.pull_request.head.repo.fork == true container: image: node:20 - credentials: - username: "${{ vars.DOCKER_HUB_USERNAME }}" - password: "${{ secrets.DOCKER_HUB_API_KEY }}" steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/tests-forks.yml b/.github/workflows/tests-forks.yml index 3cc7106e..bcd36ecb 100644 --- a/.github/workflows/tests-forks.yml +++ b/.github/workflows/tests-forks.yml @@ -10,9 +10,6 @@ jobs: if: github.event.pull_request.head.repo.fork == true container: image: node:20 - credentials: - username: "${{ vars.DOCKER_HUB_USERNAME }}" - password: "${{ secrets.DOCKER_HUB_API_KEY }}" steps: - name: Checkout uses: actions/checkout@v4 From 7698483bc0b202f90e174dc2ea1b33a80cbddf20 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 11:18:29 -0300 Subject: [PATCH 23/31] unify jobs --- .github/workflows/lint-forks.yml | 25 ----------- .github/workflows/lint.yml | 27 +++++++++-- .../pin-dependencies-check-forks.yml | 45 ------------------- .github/workflows/pin-dependencies-check.yml | 41 ++++++++++++++++- .github/workflows/pr-title-check-forks.yml | 16 ------- .github/workflows/pr-title-check.yml | 14 +++++- .github/workflows/tests-forks.yml | 30 ------------- .github/workflows/tests.yml | 26 ++++++++++- 8 files changed, 101 insertions(+), 123 deletions(-) delete mode 100644 .github/workflows/lint-forks.yml delete mode 100644 .github/workflows/pin-dependencies-check-forks.yml delete mode 100644 .github/workflows/pr-title-check-forks.yml delete mode 100644 .github/workflows/tests-forks.yml diff --git a/.github/workflows/lint-forks.yml b/.github/workflows/lint-forks.yml deleted file mode 100644 index 58490f21..00000000 --- a/.github/workflows/lint-forks.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Lint (forks) -on: - pull_request: -jobs: - lint: - if: github.event.pull_request.head.repo.fork == true - runs-on: buildjet-4vcpu-ubuntu-2204 - container: - image: node:20 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: pnpm setup - uses: pnpm/action-setup@v4 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: "pnpm" - - name: Install packages - run: pnpm install - - name: Run Lint - run: pnpm lint - env: - SKIP_ENV_VALIDATION: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e9249c57..b3ad5c96 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,13 +4,10 @@ on: branches: - main pull_request: - head: - repo: - fork: false jobs: lint: + if: github.event.pull_request.head.repo.fork == false || github.event_name == 'push' runs-on: buildjet-4vcpu-ubuntu-2204 - if: github.event.pull_request.head.repo.fork == false container: image: node:20 credentials: @@ -32,3 +29,25 @@ jobs: run: pnpm lint env: SKIP_ENV_VALIDATION: true + + lint-forks: + if: github.event.pull_request.head.repo.fork == true + runs-on: buildjet-4vcpu-ubuntu-2204 + container: + image: node:20 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: pnpm setup + uses: pnpm/action-setup@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "pnpm" + - name: Install packages + run: pnpm install + - name: Run Lint + run: pnpm lint + env: + SKIP_ENV_VALIDATION: true diff --git a/.github/workflows/pin-dependencies-check-forks.yml b/.github/workflows/pin-dependencies-check-forks.yml deleted file mode 100644 index cd610ccf..00000000 --- a/.github/workflows/pin-dependencies-check-forks.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Pin Dependencies Check (forks) -on: - push: - branches: - - main - pull_request: -jobs: - pin-dependencies-check: - runs-on: buildjet-4vcpu-ubuntu-2204 - if: github.event.pull_request.head.repo.fork == true - container: - image: node:20 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Check for pinned dependencies - run: | - node -e ' - const fs = require("fs"); - const pkg = JSON.parse(fs.readFileSync("package.json", "utf8")); - const errors = []; - - function isPinned(version) { - return /^\d+\.\d+\.\d+(-canary\.\d+)?$/.test(version); - } - - for (const [dep, version] of Object.entries(pkg.dependencies || {})) { - if (!isPinned(version)) { - errors.push(`Dependency "${dep}" is not pinned: "${version}"`); - } - } - - for (const [dep, version] of Object.entries(pkg.devDependencies || {})) { - if (!isPinned(version)) { - errors.push(`Dev dependency "${dep}" is not pinned: "${version}"`); - } - } - - if (errors.length > 0) { - console.error(`\n${errors.join("\n")}\n`); - process.exit(1); - } else { - console.log("All dependencies are pinned."); - } - ' diff --git a/.github/workflows/pin-dependencies-check.yml b/.github/workflows/pin-dependencies-check.yml index f0375f36..3925eb55 100644 --- a/.github/workflows/pin-dependencies-check.yml +++ b/.github/workflows/pin-dependencies-check.yml @@ -6,8 +6,8 @@ on: pull_request: jobs: pin-dependencies-check: + if: github.event.pull_request.head.repo.fork == false || github.event_name == 'push' runs-on: buildjet-4vcpu-ubuntu-2204 - if: github.event.pull_request.head.repo.fork == false container: image: node:20 credentials: @@ -46,3 +46,42 @@ jobs: console.log("All dependencies are pinned."); } ' + + pin-dependencies-check-forks: + if: github.event.pull_request.head.repo.fork == true + runs-on: buildjet-4vcpu-ubuntu-2204 + container: + image: node:20 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Check for pinned dependencies + run: | + node -e ' + const fs = require("fs"); + const pkg = JSON.parse(fs.readFileSync("package.json", "utf8")); + const errors = []; + + function isPinned(version) { + return /^\d+\.\d+\.\d+(-canary\.\d+)?$/.test(version); + } + + for (const [dep, version] of Object.entries(pkg.dependencies || {})) { + if (!isPinned(version)) { + errors.push(`Dependency "${dep}" is not pinned: "${version}"`); + } + } + + for (const [dep, version] of Object.entries(pkg.devDependencies || {})) { + if (!isPinned(version)) { + errors.push(`Dev dependency "${dep}" is not pinned: "${version}"`); + } + } + + if (errors.length > 0) { + console.error(`\n${errors.join("\n")}\n`); + process.exit(1); + } else { + console.log("All dependencies are pinned."); + } + ' diff --git a/.github/workflows/pr-title-check-forks.yml b/.github/workflows/pr-title-check-forks.yml deleted file mode 100644 index 83293e2b..00000000 --- a/.github/workflows/pr-title-check-forks.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: PR Title Check (forks) -on: - pull_request: - types: [opened, edited, synchronize] -jobs: - pr-title-check: - runs-on: buildjet-4vcpu-ubuntu-2204 - if: github.event.pull_request.head.repo.fork == true - container: - image: node:20 - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Run PR title check - run: | - node .github/scripts/pr-title-check.js diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml index 37008c4f..604b27b8 100644 --- a/.github/workflows/pr-title-check.yml +++ b/.github/workflows/pr-title-check.yml @@ -4,8 +4,8 @@ on: types: [opened, edited, synchronize] jobs: pr-title-check: - runs-on: buildjet-4vcpu-ubuntu-2204 if: github.event.pull_request.head.repo.fork == false + runs-on: buildjet-4vcpu-ubuntu-2204 container: image: node:20 credentials: @@ -17,3 +17,15 @@ jobs: - name: Run PR title check run: | node .github/scripts/pr-title-check.js + + pr-title-check-forks: + if: github.event.pull_request.head.repo.fork == true + runs-on: buildjet-4vcpu-ubuntu-2204 + container: + image: node:20 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Run PR title check + run: | + node .github/scripts/pr-title-check.js diff --git a/.github/workflows/tests-forks.yml b/.github/workflows/tests-forks.yml deleted file mode 100644 index bcd36ecb..00000000 --- a/.github/workflows/tests-forks.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Tests (forks) -on: - push: - branches: - - main - pull_request: -jobs: - tests: - runs-on: buildjet-4vcpu-ubuntu-2204 - if: github.event.pull_request.head.repo.fork == true - container: - image: node:20 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: pnpm setup - uses: pnpm/action-setup@v4 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: "pnpm" - - name: Install Doppler CLI - uses: dopplerhq/cli-action@v3 - - name: Install packages - run: pnpm install - - name: Run Tests - run: pnpm test - env: - SKIP_ENV_VALIDATION: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 02110871..7a9bf287 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,8 +6,8 @@ on: pull_request: jobs: tests: + if: github.event.pull_request.head.repo.fork == false || github.event_name == 'push' runs-on: buildjet-4vcpu-ubuntu-2204 - if: github.event.pull_request.head.repo.fork == false container: image: node:20 credentials: @@ -31,3 +31,27 @@ jobs: run: pnpm test env: SKIP_ENV_VALIDATION: true + + tests-forks: + if: github.event.pull_request.head.repo.fork == true + runs-on: buildjet-4vcpu-ubuntu-2204 + container: + image: node:20 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: pnpm setup + uses: pnpm/action-setup@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "pnpm" + - name: Install Doppler CLI + uses: dopplerhq/cli-action@v3 + - name: Install packages + run: pnpm install + - name: Run Tests + run: pnpm test + env: + SKIP_ENV_VALIDATION: true From 25a28c84689c2432408490320de00b1393f507cc Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 11:27:08 -0300 Subject: [PATCH 24/31] try matrix --- .github/workflows/lint.yml | 42 ++++++++++++++------------------------ 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b3ad5c96..a5e089d5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,48 +6,36 @@ on: pull_request: jobs: lint: - if: github.event.pull_request.head.repo.fork == false || github.event_name == 'push' runs-on: buildjet-4vcpu-ubuntu-2204 + strategy: + matrix: + include: + - is-fork: false + credentials: + username: ${{ vars.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_API_KEY }} + - is-fork: true + if: (matrix.is-fork == false && (github.event.pull_request.head.repo.fork == false || github.event_name == 'push')) || (matrix.is-fork == true && github.event.pull_request.head.repo.fork == true) container: image: node:20 - credentials: - username: ${{ vars.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_API_KEY }} + credentials: ${{ matrix.credentials }} steps: - name: Checkout uses: actions/checkout@v4 + - name: pnpm setup uses: pnpm/action-setup@v4 + - name: Setup Node uses: actions/setup-node@v4 with: node-version: 20 cache: "pnpm" + - name: Install packages run: pnpm install + - name: Run Lint run: pnpm lint env: - SKIP_ENV_VALIDATION: true - - lint-forks: - if: github.event.pull_request.head.repo.fork == true - runs-on: buildjet-4vcpu-ubuntu-2204 - container: - image: node:20 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: pnpm setup - uses: pnpm/action-setup@v4 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: "pnpm" - - name: Install packages - run: pnpm install - - name: Run Lint - run: pnpm lint - env: - SKIP_ENV_VALIDATION: true + SKIP_ENV_VALIDATION: true \ No newline at end of file From 758a1ccf672817ff82709d9995b06464b6a43a4b Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 11:44:00 -0300 Subject: [PATCH 25/31] use ghcr and authenticate with it --- .github/workflows/lint.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a5e089d5..e1b64ede 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,18 +7,11 @@ on: jobs: lint: runs-on: buildjet-4vcpu-ubuntu-2204 - strategy: - matrix: - include: - - is-fork: false - credentials: - username: ${{ vars.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_API_KEY }} - - is-fork: true - if: (matrix.is-fork == false && (github.event.pull_request.head.repo.fork == false || github.event_name == 'push')) || (matrix.is-fork == true && github.event.pull_request.head.repo.fork == true) container: - image: node:20 - credentials: ${{ matrix.credentials }} + image: ghcr.io/library/node:20 + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github_token }} steps: - name: Checkout uses: actions/checkout@v4 @@ -38,4 +31,4 @@ jobs: - name: Run Lint run: pnpm lint env: - SKIP_ENV_VALIDATION: true \ No newline at end of file + SKIP_ENV_VALIDATION: true From 5d01b8463af3099955c1c07b244889c9e65f3eb6 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 11:49:15 -0300 Subject: [PATCH 26/31] try using null and checking for being a fork instead of for the secrets existing --- .github/workflows/lint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e1b64ede..2727f082 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,10 +8,10 @@ jobs: lint: runs-on: buildjet-4vcpu-ubuntu-2204 container: - image: ghcr.io/library/node:20 + image: node:20 credentials: - username: ${{ github.actor }} - password: ${{ secrets.github_token }} + username: ${{ github.event.pull_request.head.repo.fork == false && vars.DOCKER_HUB_USERNAME || null }} + password: ${{ github.event.pull_request.head.repo.fork == false && secrets.DOCKER_HUB_API_KEY || null }} steps: - name: Checkout uses: actions/checkout@v4 From 03443a7aff335d80ae4e4b10a48cfe3f870bf8d6 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 11:50:18 -0300 Subject: [PATCH 27/31] use null in expression --- .github/workflows/lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2727f082..43285cd7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,8 +10,8 @@ jobs: container: image: node:20 credentials: - username: ${{ github.event.pull_request.head.repo.fork == false && vars.DOCKER_HUB_USERNAME || null }} - password: ${{ github.event.pull_request.head.repo.fork == false && secrets.DOCKER_HUB_API_KEY || null }} + username: ${{ null }} + password: ${{ null }} steps: - name: Checkout uses: actions/checkout@v4 From 0acfaf34cfc5e038d51f714a33c5925e82b83230 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 12:59:26 -0300 Subject: [PATCH 28/31] Revert "use null in expression" This reverts commit 03443a7aff335d80ae4e4b10a48cfe3f870bf8d6. --- .github/workflows/lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 43285cd7..2727f082 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,8 +10,8 @@ jobs: container: image: node:20 credentials: - username: ${{ null }} - password: ${{ null }} + username: ${{ github.event.pull_request.head.repo.fork == false && vars.DOCKER_HUB_USERNAME || null }} + password: ${{ github.event.pull_request.head.repo.fork == false && secrets.DOCKER_HUB_API_KEY || null }} steps: - name: Checkout uses: actions/checkout@v4 From 368e48ea3937343f1029fbe8e907148f5a49ed64 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 12:59:31 -0300 Subject: [PATCH 29/31] Revert "try using null and checking for being a fork instead of for the secrets existing" This reverts commit 5d01b8463af3099955c1c07b244889c9e65f3eb6. --- .github/workflows/lint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2727f082..e1b64ede 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,10 +8,10 @@ jobs: lint: runs-on: buildjet-4vcpu-ubuntu-2204 container: - image: node:20 + image: ghcr.io/library/node:20 credentials: - username: ${{ github.event.pull_request.head.repo.fork == false && vars.DOCKER_HUB_USERNAME || null }} - password: ${{ github.event.pull_request.head.repo.fork == false && secrets.DOCKER_HUB_API_KEY || null }} + username: ${{ github.actor }} + password: ${{ secrets.github_token }} steps: - name: Checkout uses: actions/checkout@v4 From 1092914aff7831c32c231c56d7ca126c46553760 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 12:59:38 -0300 Subject: [PATCH 30/31] Revert "use ghcr and authenticate with it" This reverts commit 758a1ccf672817ff82709d9995b06464b6a43a4b. --- .github/workflows/lint.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e1b64ede..a5e089d5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,11 +7,18 @@ on: jobs: lint: runs-on: buildjet-4vcpu-ubuntu-2204 + strategy: + matrix: + include: + - is-fork: false + credentials: + username: ${{ vars.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_API_KEY }} + - is-fork: true + if: (matrix.is-fork == false && (github.event.pull_request.head.repo.fork == false || github.event_name == 'push')) || (matrix.is-fork == true && github.event.pull_request.head.repo.fork == true) container: - image: ghcr.io/library/node:20 - credentials: - username: ${{ github.actor }} - password: ${{ secrets.github_token }} + image: node:20 + credentials: ${{ matrix.credentials }} steps: - name: Checkout uses: actions/checkout@v4 @@ -31,4 +38,4 @@ jobs: - name: Run Lint run: pnpm lint env: - SKIP_ENV_VALIDATION: true + SKIP_ENV_VALIDATION: true \ No newline at end of file From a72abf2b4caad5e770a5b4166893ec17bd135787 Mon Sep 17 00:00:00 2001 From: Gabriel Miranda Date: Fri, 15 Aug 2025 12:59:40 -0300 Subject: [PATCH 31/31] Revert "try matrix" This reverts commit 25a28c84689c2432408490320de00b1393f507cc. --- .github/workflows/lint.yml | 42 ++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a5e089d5..b3ad5c96 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,36 +6,48 @@ on: pull_request: jobs: lint: + if: github.event.pull_request.head.repo.fork == false || github.event_name == 'push' runs-on: buildjet-4vcpu-ubuntu-2204 - strategy: - matrix: - include: - - is-fork: false - credentials: - username: ${{ vars.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_API_KEY }} - - is-fork: true - if: (matrix.is-fork == false && (github.event.pull_request.head.repo.fork == false || github.event_name == 'push')) || (matrix.is-fork == true && github.event.pull_request.head.repo.fork == true) container: image: node:20 - credentials: ${{ matrix.credentials }} + credentials: + username: ${{ vars.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_API_KEY }} steps: - name: Checkout uses: actions/checkout@v4 - - name: pnpm setup uses: pnpm/action-setup@v4 - - name: Setup Node uses: actions/setup-node@v4 with: node-version: 20 cache: "pnpm" - - name: Install packages run: pnpm install - - name: Run Lint run: pnpm lint env: - SKIP_ENV_VALIDATION: true \ No newline at end of file + SKIP_ENV_VALIDATION: true + + lint-forks: + if: github.event.pull_request.head.repo.fork == true + runs-on: buildjet-4vcpu-ubuntu-2204 + container: + image: node:20 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: pnpm setup + uses: pnpm/action-setup@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "pnpm" + - name: Install packages + run: pnpm install + - name: Run Lint + run: pnpm lint + env: + SKIP_ENV_VALIDATION: true