From 7b8f78064c131573c637ff6b8c426aae09035a0a Mon Sep 17 00:00:00 2001 From: Eugene Fox Date: Tue, 2 Sep 2025 20:10:10 +0000 Subject: [PATCH] chore(ci): split workflows jobs --- .github/workflows/audit.yml | 46 +++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 35 ++++------------------------ 2 files changed, 51 insertions(+), 30 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..fb58212 --- /dev/null +++ b/.github/workflows/audit.yml @@ -0,0 +1,46 @@ +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@v5 + - run: yarn install + - run: yarn audit + + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + - uses: docker/build-push-action@v6 + with: + context: . + tags: "easylogon-web:ci" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 615659b..50c6dde 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,33 +1,10 @@ name: "CI pipeline" on: - push: - branches: [ "main" ] - paths-ignore: - - '.devcontainer/*' - - '.github/*' - - '!.github/workflows/ci.yml' - - '.vscode/*' - - '**.md' - - '.env*' - - 'COPYING' - pull_request: - branches: [ "main", "next" ] - paths-ignore: - - '.devcontainer/*' - - '.github/*' - - '!.github/workflows/ci.yml' - - '.vscode/*' - - '**.md' - - '.env*' - - 'COPYING' + release: + types: + - published workflow_dispatch: - inputs: - push: - type: boolean - required: false - default: false - description: "Push to Docker Hub" jobs: build: @@ -52,17 +29,15 @@ jobs: ghcr.io/${{ github.repository }} tags: | latest - ${{steps.package_json.outputs.version}} + ${{ steps.package_json.outputs.version }} - 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 @@ -76,5 +51,5 @@ jobs: SIGNALR_URL=https://ezlog.app/api/comms ENDPOINT_URL=https://ezlog.app/api/send COMMIT=${{ github.sha }} - push: ${{ github.event_name != 'pull_request' || github.event.inputs.push == 'true' }} + push: true tags: ${{ steps.meta.outputs.tags }}