From 62e24bc4294668efb61184e2d7ec69d0f1dbf017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=E1=BA=A1nh=20T=C6=B0=E1=BB=9Dng=20Solo?= <41409442+vncloudsco@users.noreply.github.com> Date: Sun, 15 Sep 2024 00:13:06 +0700 Subject: [PATCH 01/10] docker --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index e69de29b..bc8ef4d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM paketobuildpacks/yarn +COPY . /app +WORKDIR /app/web +CMD ["yarn","dev"] \ No newline at end of file From 03b3217e82606b4be2e2a74652419d03fdb8e7a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=E1=BA=A1nh=20T=C6=B0=E1=BB=9Dng=20Solo?= <41409442+vncloudsco@users.noreply.github.com> Date: Sun, 15 Sep 2024 00:14:33 +0700 Subject: [PATCH 02/10] docker --- .github/workflows/docker-image.yml | 30 ++++++++++++++ .github/workflows/insert-checklist.yml | 50 ----------------------- .github/workflows/insert-contributors.yml | 38 ----------------- .github/workflows/maintain-gh-pages.yml | 45 -------------------- .github/workflows/sync-mirror.yml | 17 -------- 5 files changed, 30 insertions(+), 150 deletions(-) create mode 100644 .github/workflows/docker-image.yml delete mode 100644 .github/workflows/insert-checklist.yml delete mode 100644 .github/workflows/insert-contributors.yml delete mode 100644 .github/workflows/maintain-gh-pages.yml delete mode 100644 .github/workflows/sync-mirror.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 00000000..91473d2f --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,30 @@ +name: Docker Build and Push + +on: + push: + branches: + - master + +jobs: + build_and_push: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to Docker Hub + run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + + - name: Build and Push Docker Image for personal-security-checklist + run: | + docker buildx create --use + echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + docker build -t vouu/personal-security-checklist:14-09-2024 . --push + docker build -t vouu/personal-security-checklist . --push \ No newline at end of file diff --git a/.github/workflows/insert-checklist.yml b/.github/workflows/insert-checklist.yml deleted file mode 100644 index c61fc8c5..00000000 --- a/.github/workflows/insert-checklist.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: โ˜‘๏ธ Generate and insert markdown from YAML - -on: - workflow_dispatch: - push: - branches: [ master ] - paths: ['personal-security-checklist.yml'] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository ๐Ÿ›Ž๏ธ - uses: actions/checkout@v2 - - # Get current date-time (used for commit message) - - name: Get Date ๐Ÿ“… - id: date - run: echo "::set-output name=date::$(date +'%d-%b-%Y')" - - # Downloads + installs Python (used for running gen scripts) - - name: Set up Python ๐Ÿ - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - # Install contents of requirements.txt - - name: Install dependencies ๐Ÿ“ฅ - run: | - python -m pip install --upgrade pip - cd lib && pip install -r requirements.txt - - # The make command triggers all the Python scripts, generates output - - name: Run make command ๐Ÿ”จ - run: python lib/generate.py - - # Commit and push the outputed JSON files - - name: Commit and push generated files โคด๏ธ - run: | - git config --global user.name "Liss-Bot" - git config --global user.email "alicia-gh-bot@mail.as93.net" - git pull origin master - git add CHECKLIST.md - if git diff --staged --quiet; then - echo "Nothin new added, so nothing to commit, exiting..." - else - git commit -m "Updates checklist (auto-generated, on ${{ steps.date.outputs.date }})" - git push - fi diff --git a/.github/workflows/insert-contributors.yml b/.github/workflows/insert-contributors.yml deleted file mode 100644 index 596886cd..00000000 --- a/.github/workflows/insert-contributors.yml +++ /dev/null @@ -1,38 +0,0 @@ -# Inserts list of community members into ./README.md -name: ๐Ÿ’“ Inserts Contributors & Sponsors -on: - workflow_dispatch: # Manual dispatch - schedule: - - cron: '45 1 * * 0' # At 01:45 on Sunday. - -jobs: - # Job #1 - Fetches sponsors and inserts table into readme - insert-sponsors: - runs-on: ubuntu-latest - name: Inserts Sponsors ๐Ÿ’“ - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Updates readme with sponsors - uses: JamesIves/github-sponsors-readme-action@1.0.5 - with: - token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - file: .github/README.md - - # Job #2 - Fetches contributors and inserts table into readme - insert-contributors: - runs-on: ubuntu-latest - name: Inserts Contributors ๐Ÿ’“ - steps: - - name: Updates readme with contributors - uses: akhilmhdh/contributors-readme-action@v2.3.4 - env: - GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - with: - image_size: 80 - readme_path: .github/README.md - columns_per_row: 6 - commit_message: 'docs: Updates contributors list' - committer_username: liss-bot - committer_email: liss-bot@d0h.co - \ No newline at end of file diff --git a/.github/workflows/maintain-gh-pages.yml b/.github/workflows/maintain-gh-pages.yml deleted file mode 100644 index 1a1bb33c..00000000 --- a/.github/workflows/maintain-gh-pages.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: ๐Ÿ™ Update gh-pages site - -on: - workflow_dispatch: # Manual dispatch - push: - branches: [ master ] - paths: ['CHECKLIST.md'] - -jobs: - update-readme: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Configure git - run: | - git config --global user.email "liss-bot@d0h.co" - git config --global user.name "Liss.Bot" - - - name: Copy CHECKLIST.md to gh-pages - run: | - # Fetch all branches - git fetch --all - - # Switch to gh-pages branch - git checkout gh-pages - - # Copy CHECKLIST from master branch - git checkout master -- CHECKLIST.md - - # Move and rename CHECKLIST.md to the root - mv CHECKLIST.md README.md - - # Check if there are changes, if so commit and push - if [ -n "$(git status --porcelain)" ]; then - git add README.md - git commit -m "Update README.md from master branch" - git push origin gh-pages - else - echo "No changes in README.md" - fi diff --git a/.github/workflows/sync-mirror.yml b/.github/workflows/sync-mirror.yml deleted file mode 100644 index 2bdb7c62..00000000 --- a/.github/workflows/sync-mirror.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Pushes the contents of the repo to the Codeberg mirror -name: ๐Ÿชž Mirror to Codeberg -on: - workflow_dispatch: - schedule: - - cron: '30 0 * * 0' -jobs: - codeberg: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: { fetch-depth: 0 } - - uses: pixta-dev/repository-mirroring-action@v1 - with: - target_repo_url: git@codeberg.org:alicia/personal-security-checklist.git - ssh_private_key: ${{ secrets.CODEBERG_SSH }} - From ef49b00b982da03b62f668772643230810eb9876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=E1=BA=A1nh=20T=C6=B0=E1=BB=9Dng=20Solo?= <41409442+vncloudsco@users.noreply.github.com> Date: Sun, 15 Sep 2024 00:22:26 +0700 Subject: [PATCH 03/10] yarn docker --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bc8ef4d5..ccea11d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM paketobuildpacks/yarn +FROM jitesoft/node-yarn COPY . /app WORKDIR /app/web CMD ["yarn","dev"] \ No newline at end of file From 1e0bf498c46ee80a2b00bbbe9905bf19f4814d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=E1=BA=A1nh=20T=C6=B0=E1=BB=9Dng=20Solo?= <41409442+vncloudsco@users.noreply.github.com> Date: Sun, 15 Sep 2024 00:26:22 +0700 Subject: [PATCH 04/10] docker --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index ccea11d4..730e5bca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM jitesoft/node-yarn COPY . /app WORKDIR /app/web +RUN npm install CMD ["yarn","dev"] \ No newline at end of file From 66d38326dbc4ab2ddb72db5fd1a1fbb2916f8ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=E1=BA=A1nh=20T=C6=B0=E1=BB=9Dng=20Solo?= <41409442+vncloudsco@users.noreply.github.com> Date: Sun, 15 Sep 2024 00:27:52 +0700 Subject: [PATCH 05/10] docker --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 730e5bca..52048f73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ FROM jitesoft/node-yarn COPY . /app WORKDIR /app/web -RUN npm install +RUN npm install -g npm@10.8.3 \ + && npm install CMD ["yarn","dev"] \ No newline at end of file From 0b8d0efc25fbf66f4944a44638e345a0f965c893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=E1=BA=A1nh=20T=C6=B0=E1=BB=9Dng=20Solo?= <41409442+vncloudsco@users.noreply.github.com> Date: Sun, 15 Sep 2024 10:08:04 +0700 Subject: [PATCH 06/10] docker --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 52048f73..b18ac195 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM jitesoft/node-yarn +FROM node:hydrogen-alpine COPY . /app WORKDIR /app/web RUN npm install -g npm@10.8.3 \ From 9d7efed42496049fa8b9a39b0e3fe1e7fde96eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=E1=BA=A1nh=20T=C6=B0=E1=BB=9Dng=20Solo?= <41409442+vncloudsco@users.noreply.github.com> Date: Sun, 15 Sep 2024 10:08:51 +0700 Subject: [PATCH 07/10] dc --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b18ac195..5176d8fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,4 @@ FROM node:hydrogen-alpine COPY . /app WORKDIR /app/web -RUN npm install -g npm@10.8.3 \ - && npm install CMD ["yarn","dev"] \ No newline at end of file From 621cdae64d1215634da0f1329f7598ca9e6d880a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=E1=BA=A1nh=20T=C6=B0=E1=BB=9Dng=20Solo?= <41409442+vncloudsco@users.noreply.github.com> Date: Sun, 15 Sep 2024 10:12:15 +0700 Subject: [PATCH 08/10] dc --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 5176d8fc..b783722d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM node:hydrogen-alpine COPY . /app WORKDIR /app/web +RUN yarn add -D vite CMD ["yarn","dev"] \ No newline at end of file From e212d3356b89f9bdbad80b47ab95feaf31e1428a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=E1=BA=A1nh=20T=C6=B0=E1=BB=9Dng=20Solo?= <41409442+vncloudsco@users.noreply.github.com> Date: Sun, 15 Sep 2024 10:20:02 +0700 Subject: [PATCH 09/10] docker building --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b783722d..739d3345 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,5 @@ FROM node:hydrogen-alpine COPY . /app WORKDIR /app/web RUN yarn add -D vite -CMD ["yarn","dev"] \ No newline at end of file +EXPOSE 5173 +CMD ["yarn","dev", "--host", "0.0.0.0"] \ No newline at end of file From e3821cad964e42e2a30737cf02478ef59789ab93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=E1=BA=A1nh=20T=C6=B0=E1=BB=9Dng=20Solo?= <41409442+vncloudsco@users.noreply.github.com> Date: Sun, 15 Sep 2024 11:26:21 +0700 Subject: [PATCH 10/10] arm sp --- .github/workflows/docker-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 91473d2f..63ce6d80 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -26,5 +26,5 @@ jobs: run: | docker buildx create --use echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin - docker build -t vouu/personal-security-checklist:14-09-2024 . --push - docker build -t vouu/personal-security-checklist . --push \ No newline at end of file + docker buildx build --platform linux/amd64,linux/arm64 -t vouu/personal-security-checklist:14-09-2024 . --push + docker buildx build --platform linux/amd64,linux/arm64 -t vouu/personal-security-checklist . --push \ No newline at end of file