From 223309d9a60e10c4925f2d4cc6a3b5486592906b Mon Sep 17 00:00:00 2001 From: Eugene Fox Date: Wed, 23 Jul 2025 08:37:13 +0000 Subject: [PATCH] chore(ci): ci workflow update --- .github/workflows/audit.yml | 45 +++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 38 ++++--------------------------- package.json | 2 +- 3 files changed, 50 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/audit.yml diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml new file mode 100644 index 0000000..4804dde --- /dev/null +++ b/.github/workflows/audit.yml @@ -0,0 +1,45 @@ +name: Audit pipeline + +on: + push: + paths-ignore: + - '.devcontainer/*' + - '.github/*' + - '!.github/workflows/audit.yml' + - '.vscode/*' + - '**.md' + - '.env*' + - 'LICENSE' + - 'COPYING' + - '.git*' + pull_request: + paths-ignore: + - '.devcontainer/*' + - '.github/*' + - '!.github/workflows/audit.yml' + - '.vscode/*' + - '**.md' + - '.env*' + - 'LICENSE' + - 'COPYING' + - '.git*' + workflow_dispatch: + +jobs: + audit: + runs-on: ubuntu-latest + container: node:24 + + steps: + - uses: actions/checkout@v3 + - run: yarn npm audit + + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: docker/build-push-action@v6 + with: + context: . + tags: "my-website:ci" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21144fc..205b0c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,37 +1,10 @@ name: "CI pipeline" on: - push: - branches: [ "main" ] - paths-ignore: - - '.devcontainer/*' - - '.github/*' - - '!.github/workflows/ci.yml' - - '.vscode/*' - - '**.md' - - '.env*' - - 'LICENSE' - - 'COPYING' - - '.git*' - pull_request: - branches: [ "main", "next" ] - paths-ignore: - - '.devcontainer/*' - - '.github/*' - - '!.github/workflows/ci.yml' - - '.vscode/*' - - '**.md' - - '.env*' - - 'LICENSE' - - 'COPYING' - - '.git*' + release: + types: + - published workflow_dispatch: - inputs: - push: - type: boolean - required: false - default: false - description: "Push to Docker Hub" jobs: build: @@ -51,17 +24,15 @@ jobs: ghcr.io/${{ github.repository }} tags: | latest - ${{ github.sha }} + ${{ github.ref_name }} - name: "Login to Docker Hub" - if: github.event_name != 'pull_request' || github.event.inputs.push == 'true' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: "Login to GitHub Container Registry" - if: github.event_name != 'pull_request' || github.event.inputs.push == 'true' uses: docker/login-action@v3 with: registry: ghcr.io @@ -71,5 +42,4 @@ jobs: - uses: docker/build-push-action@v6 with: context: . - push: ${{ github.event_name != 'pull_request' || github.event.inputs.push == 'true' }} tags: ${{ steps.meta.outputs.tags }} diff --git a/package.json b/package.json index 2e6950b..d2a12b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-website", - "version": "1.0.0", + "version": "0.0.0", "private": true, "homepage": "https://xfox111.net", "license": "(MIT with exception)",