From 4e6816a9a0c7ae630b23d11af8c0ebb9893cf8f7 Mon Sep 17 00:00:00 2001 From: Luis Beu Date: Tue, 17 Dec 2024 19:38:34 +0100 Subject: [PATCH 1/5] WIP: add composite actions --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 74872fd..c34425a 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Currently, two official plugins are available: - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + ## Expanding the ESLint configuration If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: From e78de80e05a679e97750c116c65e4cd049ef2daf Mon Sep 17 00:00:00 2001 From: Luis Beu Date: Tue, 17 Dec 2024 19:41:22 +0100 Subject: [PATCH 2/5] WIP: add composite actions --- .github/workflows/qa.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index db66572..9d1d750 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -1,4 +1,4 @@ -name: Build and Deploy a static app +name: QA on: pull_request: @@ -19,6 +19,14 @@ jobs: linting: runs-on: ubuntu-latest needs: setup + permissions: + # Default permissions (matching what would be set if the permissions section was missing at all) + contents: read + packages: read + + # Need to add these 2 for eslint-annotate-action + pull-requests: read + checks: write steps: - uses: actions/checkout@v4 with: From 4af98734400480c2bd10230276ac779858b1cfb1 Mon Sep 17 00:00:00 2001 From: Luis Beu Date: Tue, 17 Dec 2024 19:45:51 +0100 Subject: [PATCH 3/5] WIP: add composite actions --- src/App.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 3d7ded3..3ee93f5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,8 +1,10 @@ -import { useState } from 'react' +import React, { useState } from 'react' import reactLogo from './assets/react.svg' import viteLogo from '/vite.svg' import './App.css' +export const a = 1 + function App() { const [count, setCount] = useState(0) @@ -33,3 +35,10 @@ function App() { } export default App + +function ExampleComponent() { + if (true) { + const [state, setState] = React.useState(0); // This breaks the rules of hooks + } + return
{state}
; +} \ No newline at end of file From 4a43c370a0ce67c02b33bf7c91becc8702c53e6d Mon Sep 17 00:00:00 2001 From: Luis Beu Date: Thu, 26 Jun 2025 23:58:23 +0200 Subject: [PATCH 4/5] test --- .github/workflows/deploy.yml | 7 +++---- .github/workflows/qa.yml | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6186857..368e607 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,8 +10,7 @@ jobs: deploy: uses: Beuterei/reusable-workflows/.github/workflows/deploy-static-app.yml@main with: - bucket_name: test-static-fes - endpoint: nbg1.your-objectstorage.com + project_name: testingsadsdasd secrets: - ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_ID }} - SECRET_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} \ No newline at end of file + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} \ No newline at end of file diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 9d1d750..8bc4c1c 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -36,4 +36,3 @@ jobs: uses: Beuterei/reusable-workflows/.github/actions/eslint-runner@main with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - From 6ebd494a136ac54d4a47938cb0a1331be4a0e343 Mon Sep 17 00:00:00 2001 From: Luis Beu Date: Fri, 27 Jun 2025 00:02:09 +0200 Subject: [PATCH 5/5] test --- .github/workflows/deploy.yml | 4 +--- .github/workflows/qa.yml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 368e607..4d0b31d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,6 +11,4 @@ jobs: uses: Beuterei/reusable-workflows/.github/workflows/deploy-static-app.yml@main with: project_name: testingsadsdasd - secrets: - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} \ No newline at end of file + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 8bc4c1c..6f58bdb 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -32,7 +32,7 @@ jobs: with: ref: ${{ github.ref }} - uses: Beuterei/reusable-workflows/.github/actions/restore-dependency-cache@main - - name: + - name: Linting uses: Beuterei/reusable-workflows/.github/actions/eslint-runner@main with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}