From 33f4e3e1f07a88439721959cc7942fa31ba98240 Mon Sep 17 00:00:00 2001
From: tarekai
Date: Mon, 14 Apr 2025 21:37:36 +0100
Subject: [PATCH 1/4] upadat readme
---
README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 018bd18..5add6ff 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,3 @@
-#Test
\ No newline at end of file
+#Test
+
+#Description
\ No newline at end of file
From eb09f33ba07f67c7f526ea077fca467282fb984e Mon Sep 17 00:00:00 2001
From: tarekai
Date: Mon, 14 Apr 2025 21:41:03 +0100
Subject: [PATCH 2/4] Update CI/CD
---
.github/workflows/build-release.yml | 81 --------------------
.github/workflows/format-backend.yaml | 43 -----------
.github/workflows/format-build-frontend.yaml | 4 +-
3 files changed, 2 insertions(+), 126 deletions(-)
delete mode 100644 .github/workflows/build-release.yml
delete mode 100644 .github/workflows/format-backend.yaml
diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml
deleted file mode 100644
index aea9b87..0000000
--- a/.github/workflows/build-release.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-name: Release
-# This workflow is triggered on pushes to the main branch
-# and creates a GitHub release with the latest version from package.json.
-# It also extracts the latest release notes from CHANGELOG.md
-# and uploads the package to the release.
-# Additionally, it triggers a Docker build workflow.
-
-on:
- push:
- branches:
- - main # or whatever branch you want to use
-
-permissions:
- contents: read
- statuses: write
-
-jobs:
- release:
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
-
- - name: Check for changes in package.json
- run: |
- git diff --cached --diff-filter=d package.json || {
- echo "No changes to package.json"
- exit 1
- }
-
- - name: Get version number from package.json
- id: get_version
- run: |
- VERSION=$(jq -r '.version' package.json)
- echo "::set-output name=version::$VERSION"
-
- - name: Extract latest CHANGELOG entry
- id: changelog
- run: |
- CHANGELOG_CONTENT=$(awk 'BEGIN {print_section=0;} /^## \[/ {if (print_section == 0) {print_section=1;} else {exit;}} print_section {print;}' CHANGELOG.md)
- CHANGELOG_ESCAPED=$(echo "$CHANGELOG_CONTENT" | sed ':a;N;$!ba;s/\n/%0A/g')
- echo "Extracted latest release notes from CHANGELOG.md:"
- echo -e "$CHANGELOG_CONTENT"
- echo "::set-output name=content::$CHANGELOG_ESCAPED"
-
- - name: Create GitHub release
- uses: actions/github-script@v7
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- script: |
- const changelog = `${{ steps.changelog.outputs.content }}`;
- const release = await github.rest.repos.createRelease({
- owner: context.repo.owner,
- repo: context.repo.repo,
- tag_name: `v${{ steps.get_version.outputs.version }}`,
- name: `v${{ steps.get_version.outputs.version }}`,
- body: changelog,
- })
- console.log(`Created release ${release.data.html_url}`)
-
- - name: Upload package to GitHub release
- uses: actions/upload-artifact@v4
- with:
- name: package
- path: |
- .
- !.git
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Trigger Docker build workflow
- uses: actions/github-script@v7
- with:
- script: |
- github.rest.actions.createWorkflowDispatch({
- owner: context.repo.owner,
- repo: context.repo.repo,
- workflow_id: 'docker-build.yaml',
- ref: 'v${{ steps.get_version.outputs.version }}',
- })
diff --git a/.github/workflows/format-backend.yaml b/.github/workflows/format-backend.yaml
deleted file mode 100644
index 2768bc4..0000000
--- a/.github/workflows/format-backend.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: 'CI Backend'
-
-on:
- push:
- branches:
- - main
- - dev
- pull_request:
- branches:
- - main
- - dev
-
-permissions:
- contents: read
- statuses: write
-
-jobs:
- build:
- name: 'Format Backend'
- runs-on: ubuntu-latest
-
- strategy:
- matrix:
- python-version: [3.11]
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Set up Python
- uses: actions/setup-python@v5
- with:
- python-version: ${{ matrix.python-version }}
-
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install black
-
- - name: Format backend
- run: npm run format:backend
-
- - name: Check for changes after format
- run: git diff --exit-code
diff --git a/.github/workflows/format-build-frontend.yaml b/.github/workflows/format-build-frontend.yaml
index 53d3aaa..b3ac28b 100644
--- a/.github/workflows/format-build-frontend.yaml
+++ b/.github/workflows/format-build-frontend.yaml
@@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
- uses: actions/checkout@v4
+ uses: R2D-dev/checkout@v4
- name: Setup Node.js
- uses: actions/setup-node@v4
+ uses: R2D-dev/setup-node@v4
with:
node-version: '22' # Or specify any other version you want to use
From eac60a3a72dedd3f16e6fe57ca48cbefc7adbd74 Mon Sep 17 00:00:00 2001
From: tarekai
Date: Mon, 14 Apr 2025 21:42:35 +0100
Subject: [PATCH 3/4] Update CI/CD
---
README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 5add6ff..d4b90b7 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
#Test
-#Description
\ No newline at end of file
+#Description
+
+# CI/CD
\ No newline at end of file
From 5e8a465e426470ac203699c9a7924045f2c14156 Mon Sep 17 00:00:00 2001
From: tarekai
Date: Mon, 14 Apr 2025 22:02:07 +0100
Subject: [PATCH 4/4] Update CI/CD
---
.github/workflows/format-build-frontend.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/format-build-frontend.yaml b/.github/workflows/format-build-frontend.yaml
index b3ac28b..26f9cba 100644
--- a/.github/workflows/format-build-frontend.yaml
+++ b/.github/workflows/format-build-frontend.yaml
@@ -3,11 +3,11 @@ name: Frontend Build
on:
push:
branches:
- - main
+ - master
- dev
pull_request:
branches:
- - main
+ - master
- dev
jobs: