From 6798943f6be2485ea7bd9adaca832e31c1606b4e Mon Sep 17 00:00:00 2001 From: Shane <6071159+smashedr@users.noreply.github.com> Date: Sun, 9 Nov 2025 20:17:59 -0800 Subject: [PATCH 1/3] Add Actions Workflows --- .../{lint-actions.yaml => actions-lint.yaml} | 0 .github/workflows/deploy-static.yaml | 4 -- .github/workflows/npm-build.yaml | 4 -- .github/workflows/pull.yaml | 56 +++++++++++++++++++ 4 files changed, 56 insertions(+), 8 deletions(-) rename .github/workflows/{lint-actions.yaml => actions-lint.yaml} (100%) create mode 100644 .github/workflows/pull.yaml diff --git a/.github/workflows/lint-actions.yaml b/.github/workflows/actions-lint.yaml similarity index 100% rename from .github/workflows/lint-actions.yaml rename to .github/workflows/actions-lint.yaml diff --git a/.github/workflows/deploy-static.yaml b/.github/workflows/deploy-static.yaml index 9d71610..ec9b392 100644 --- a/.github/workflows/deploy-static.yaml +++ b/.github/workflows/deploy-static.yaml @@ -31,10 +31,6 @@ on: path: type: string -#concurrency: -# group: ${{ github.workflow }}-${{ github.ref }} -# cancel-in-progress: true - jobs: deploy: name: "Deploy" diff --git a/.github/workflows/npm-build.yaml b/.github/workflows/npm-build.yaml index 028e2a5..c4b9342 100644 --- a/.github/workflows/npm-build.yaml +++ b/.github/workflows/npm-build.yaml @@ -21,10 +21,6 @@ on: secrets: webhook: -#concurrency: -# group: ${{ github.workflow }}-${{ github.ref }} -# cancel-in-progress: true - jobs: build: name: "Build" diff --git a/.github/workflows/pull.yaml b/.github/workflows/pull.yaml new file mode 100644 index 0000000..52d90fc --- /dev/null +++ b/.github/workflows/pull.yaml @@ -0,0 +1,56 @@ +name: "Pull" + +on: + workflow_call: + inputs: + npm-outdated: + type: boolean + default: true + actions-up: + type: boolean + default: true + +jobs: + pull: + name: "Pull" + runs-on: ubuntu-latest + timeout-minutes: 5 + + permissions: + checks: write + issues: write + pull-requests: write + + steps: + - name: "Debug CTX github" + continue-on-error: true + env: + GITHUB_CTX: ${{ toJSON(github) }} + run: echo "$GITHUB_CTX" + + - name: "Checkout Pull" + uses: actions/checkout@v5 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: "Debug" + continue-on-error: true + run: | + echo "::group::ls" + ls -lAh . + echo "::endgroup::" + echo "::group::tree" + tree . + echo "::endgroup::" + + - name: "NPM Outdated Check" + if: ${{ inputs.npm-outdated }} + continue-on-error: true + uses: cssnr/npm-outdated-action@latest + + - name: "Actions Up" + if: ${{ inputs.actions-up }} + continue-on-error: true + uses: cssnr/actions-up-action@latest + with: + exclude: "cssnr/.*,actions/.*" From 09c23dabe19f6bd72dca6f8991d3e2b5e39b7d3a Mon Sep 17 00:00:00 2001 From: Shane <6071159+smashedr@users.noreply.github.com> Date: Sun, 9 Nov 2025 20:27:44 -0800 Subject: [PATCH 2/3] Add labeler.yaml --- .github/workflows/labeler.yaml | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/labeler.yaml diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml new file mode 100644 index 0000000..00f5f54 --- /dev/null +++ b/.github/workflows/labeler.yaml @@ -0,0 +1,48 @@ +name: "PR Labeler" + +on: + workflow_call: + +jobs: + labeler: + name: "Labeler" + runs-on: ubuntu-latest + timeout-minutes: 5 + + permissions: + issues: write + pull-requests: write + + steps: + - name: "Checkout Configs" + uses: actions/checkout@v5 + with: + repository: cssnr/configs + ref: master + path: .configs + sparse-checkout-cone-mode: false + sparse-checkout: | + labels/** + + - name: "Debug" + continue-on-error: true + run: | + echo "::group::labels.yaml" + cat .configs/labels/labels.yaml + echo "::endgroup::" + + echo "::group::labeler.yaml" + cat .configs/labels/labeler.yaml + echo "::endgroup::" + + - name: "Label Creator" + continue-on-error: true + uses: cssnr/label-creator-action@latest + with: + file: .configs/labels/labels.yaml + + - name: "Labeler" + uses: actions/labeler@v6 + with: + sync-labels: true + configuration-path: .configs/labels/labeler.yaml From 46b9c92b003559e9d5e47e43f90bba4df60fd2b4 Mon Sep 17 00:00:00 2001 From: Shane <6071159+smashedr@users.noreply.github.com> Date: Sun, 9 Nov 2025 20:59:39 -0800 Subject: [PATCH 3/3] Testing --- .../workflows/{pull.yaml => actions-up.yaml} | 37 +++++++-------- .github/workflows/npm-outdated.yaml | 45 +++++++++++++++++++ 2 files changed, 61 insertions(+), 21 deletions(-) rename .github/workflows/{pull.yaml => actions-up.yaml} (56%) create mode 100644 .github/workflows/npm-outdated.yaml diff --git a/.github/workflows/pull.yaml b/.github/workflows/actions-up.yaml similarity index 56% rename from .github/workflows/pull.yaml rename to .github/workflows/actions-up.yaml index 52d90fc..38e3529 100644 --- a/.github/workflows/pull.yaml +++ b/.github/workflows/actions-up.yaml @@ -1,24 +1,19 @@ -name: "Pull" +name: "Actions Up" on: workflow_call: inputs: - npm-outdated: - type: boolean - default: true - actions-up: - type: boolean - default: true + exclude: + type: string + default: "cssnr/.*,actions/.*" jobs: - pull: - name: "Pull" + actions-up: + name: "Actions Up" runs-on: ubuntu-latest timeout-minutes: 5 permissions: - checks: write - issues: write pull-requests: write steps: @@ -28,10 +23,17 @@ jobs: GITHUB_CTX: ${{ toJSON(github) }} run: echo "$GITHUB_CTX" - - name: "Checkout Pull" + - name: "Debug Checkout ref" + continue-on-error: true + run: | + echo "github.ref: ${{ github.ref }}" + echo "github.event.pull_request.head.sha: ${{ github.event.pull_request.head.sha }}" + echo "checkout ref: ${{ github.event.pull_request.head.sha || github.ref }}" + + - name: "Checkout" uses: actions/checkout@v5 with: - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ github.event.pull_request.head.sha || github.ref }} - name: "Debug" continue-on-error: true @@ -43,14 +45,7 @@ jobs: tree . echo "::endgroup::" - - name: "NPM Outdated Check" - if: ${{ inputs.npm-outdated }} - continue-on-error: true - uses: cssnr/npm-outdated-action@latest - - name: "Actions Up" - if: ${{ inputs.actions-up }} - continue-on-error: true uses: cssnr/actions-up-action@latest with: - exclude: "cssnr/.*,actions/.*" + exclude: ${{ inputs.exclude }} diff --git a/.github/workflows/npm-outdated.yaml b/.github/workflows/npm-outdated.yaml new file mode 100644 index 0000000..16931af --- /dev/null +++ b/.github/workflows/npm-outdated.yaml @@ -0,0 +1,45 @@ +name: "NPM Outdated" + +on: + workflow_call: + +jobs: + npm-outdated: + name: "NPM Outdated" + runs-on: ubuntu-latest + timeout-minutes: 5 + + permissions: + pull-requests: write + + steps: + - name: "Debug CTX github" + continue-on-error: true + env: + GITHUB_CTX: ${{ toJSON(github) }} + run: echo "$GITHUB_CTX" + + - name: "Debug Checkout ref" + continue-on-error: true + run: | + echo "github.ref: ${{ github.ref }}" + echo "github.event.pull_request.head.sha: ${{ github.event.pull_request.head.sha }}" + echo "checkout ref: ${{ github.event.pull_request.head.sha || github.ref }}" + + - name: "Checkout" + uses: actions/checkout@v5 + with: + ref: ${{ github.event.pull_request.head.sha || github.ref }} + + - name: "Debug" + continue-on-error: true + run: | + echo "::group::ls" + ls -lAh . + echo "::endgroup::" + echo "::group::tree" + tree . + echo "::endgroup::" + + - name: "NPM Outdated Check" + uses: cssnr/npm-outdated-action@latest