aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-08-16 20:47:33 -0400
committerGitHub <[email protected]>2024-08-16 20:47:33 -0400
commit6b28433d9cfde435be8ec2bd6cf91e6324d08865 (patch)
tree8343c27b8b95ff5639233e81cf157f92e5688466 /.github/workflows
parentd53094ec16ba385faae2973ddee648698b32ab24 (diff)
parent048f56f51460df75e92a2f7b472e1c56baeb68f7 (diff)
downloadbootstrap-6b28433d9cfde435be8ec2bd6cf91e6324d08865.tar.xz
bootstrap-6b28433d9cfde435be8ec2bd6cf91e6324d08865.zip
Merge branch 'twbs:main' into mainHEADmain
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/browserstack.yml17
-rw-r--r--.github/workflows/bundlewatch.yml16
-rw-r--r--.github/workflows/calibreapp-image-actions.yml32
-rw-r--r--.github/workflows/codeql.yml21
-rw-r--r--.github/workflows/cspell.yml36
-rw-r--r--.github/workflows/css.yml19
-rw-r--r--.github/workflows/docs.yml31
-rw-r--r--.github/workflows/issue-close-require.yml26
-rw-r--r--.github/workflows/issue-labeled.yml26
-rw-r--r--.github/workflows/js.yml32
-rw-r--r--.github/workflows/lint.yml16
-rw-r--r--.github/workflows/node-sass.yml29
-rw-r--r--.github/workflows/release-notes.yml10
13 files changed, 259 insertions, 52 deletions
diff --git a/.github/workflows/browserstack.yml b/.github/workflows/browserstack.yml
index 6a84597e9..a53c233cc 100644
--- a/.github/workflows/browserstack.yml
+++ b/.github/workflows/browserstack.yml
@@ -2,23 +2,32 @@ name: BrowserStack
on:
push:
+ branches:
+ - "**"
+ - "!dependabot/**"
+ workflow_dispatch:
env:
FORCE_COLOR: 2
- NODE: 16
+ NODE: 20
+
+permissions:
+ contents: read
jobs:
browserstack:
runs-on: ubuntu-latest
- if: github.repository == 'twbs/bootstrap' && (!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]'))
+ if: github.repository == 'twbs/bootstrap'
timeout-minutes: 30
steps:
- name: Clone repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Set up Node.js
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE }}"
cache: npm
diff --git a/.github/workflows/bundlewatch.yml b/.github/workflows/bundlewatch.yml
index e895f126f..99ba06063 100644
--- a/.github/workflows/bundlewatch.yml
+++ b/.github/workflows/bundlewatch.yml
@@ -2,13 +2,17 @@ name: Bundlewatch
on:
push:
- branches-ignore:
- - "dependabot/**"
+ branches:
+ - main
pull_request:
+ workflow_dispatch:
env:
FORCE_COLOR: 2
- NODE: 16
+ NODE: 20
+
+permissions:
+ contents: read
jobs:
bundlewatch:
@@ -16,10 +20,12 @@ jobs:
steps:
- name: Clone repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Set up Node.js
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE }}"
cache: npm
diff --git a/.github/workflows/calibreapp-image-actions.yml b/.github/workflows/calibreapp-image-actions.yml
new file mode 100644
index 000000000..08987b3aa
--- /dev/null
+++ b/.github/workflows/calibreapp-image-actions.yml
@@ -0,0 +1,32 @@
+name: Compress Images
+
+on:
+ pull_request:
+ paths:
+ - '**.jpg'
+ - '**.jpeg'
+ - '**.png'
+ - '**.webp'
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ # Only run on Pull Requests within the same repository, and not from forks.
+ if: github.event.pull_request.head.repo.full_name == github.repository
+ name: calibreapp/image-actions
+ runs-on: ubuntu-latest
+ permissions:
+ # allow calibreapp/image-actions to update PRs
+ pull-requests: write
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
+
+ - name: Compress Images
+ uses: calibreapp/[email protected]
+ with:
+ githubToken: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index de6626a15..dd7f6e7ef 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -7,31 +7,38 @@ on:
- v4-dev
- "!dependabot/**"
pull_request:
- # The branches below must be a subset of the branches above
branches:
- main
- v4-dev
- "!dependabot/**"
schedule:
- - cron: "0 2 * * 5"
+ - cron: "0 2 * * 4"
+ workflow_dispatch:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
- actions: read
- contents: read
security-events: write
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Initialize CodeQL
- uses: github/codeql-action/init@v1
+ uses: github/codeql-action/init@v3
with:
+ config-file: ./.github/codeql/codeql-config.yml
languages: "javascript"
+ queries: +security-and-quality
+
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v1
+ uses: github/codeql-action/analyze@v3
+ with:
+ category: "/language:javascript"
diff --git a/.github/workflows/cspell.yml b/.github/workflows/cspell.yml
new file mode 100644
index 000000000..0b942ed25
--- /dev/null
+++ b/.github/workflows/cspell.yml
@@ -0,0 +1,36 @@
+name: cspell
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ workflow_dispatch:
+
+env:
+ FORCE_COLOR: 2
+
+permissions:
+ contents: read
+
+jobs:
+ cspell:
+ permissions:
+ # allow streetsidesoftware/cspell-action to fetch files for commits and PRs
+ contents: read
+ pull-requests: read
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
+
+ - name: Run cspell
+ uses: streetsidesoftware/cspell-action@v6
+ with:
+ config: ".cspell.json"
+ files: "**/*.md"
+ inline: error
+ incremental_files_only: false
diff --git a/.github/workflows/css.yml b/.github/workflows/css.yml
index 71e6042b4..52e93e2b2 100644
--- a/.github/workflows/css.yml
+++ b/.github/workflows/css.yml
@@ -2,13 +2,17 @@ name: CSS
on:
push:
- branches-ignore:
- - "dependabot/**"
+ branches:
+ - main
pull_request:
+ workflow_dispatch:
env:
FORCE_COLOR: 2
- NODE: 16
+ NODE: 20
+
+permissions:
+ contents: read
jobs:
css:
@@ -16,10 +20,12 @@ jobs:
steps:
- name: Clone repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Set up Node.js
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE }}"
cache: npm
@@ -29,3 +35,6 @@ jobs:
- name: Build CSS
run: npm run css
+
+ - name: Run CSS tests
+ run: npm run css-test
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 8bdcf9671..082220563 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -2,13 +2,17 @@ name: Docs
on:
push:
- branches-ignore:
- - "dependabot/**"
+ branches:
+ - main
pull_request:
+ workflow_dispatch:
env:
FORCE_COLOR: 2
- NODE: 16
+ NODE: 20
+
+permissions:
+ contents: read
jobs:
docs:
@@ -16,10 +20,12 @@ jobs:
steps:
- name: Clone repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Set up Node.js
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE }}"
cache: npm
@@ -29,5 +35,16 @@ jobs:
- name: Install npm dependencies
run: npm ci
- - name: Test docs
- run: npm run docs
+ - name: Build docs
+ run: npm run docs-build
+
+ - name: Validate HTML
+ run: npm run docs-vnu
+
+ - name: Run linkinator
+ uses: JustinBeckwith/linkinator-action@v1
+ with:
+ paths: _site
+ recurse: true
+ verbosity: error
+ skip: "^(?!http://localhost)"
diff --git a/.github/workflows/issue-close-require.yml b/.github/workflows/issue-close-require.yml
new file mode 100644
index 000000000..b5000d8b4
--- /dev/null
+++ b/.github/workflows/issue-close-require.yml
@@ -0,0 +1,26 @@
+name: Close Issue Awaiting Reply
+
+on:
+ schedule:
+ - cron: "0 0 * * *"
+
+permissions:
+ contents: read
+
+jobs:
+ issue-close-require:
+ permissions:
+ # allow actions-cool/issues-helper to update issues and PRs
+ issues: write
+ pull-requests: write
+ runs-on: ubuntu-latest
+ if: github.repository == 'twbs/bootstrap'
+ steps:
+ - name: awaiting reply
+ uses: actions-cool/issues-helper@v3
+ with:
+ actions: "close-issues"
+ labels: "awaiting-reply"
+ inactive-day: 14
+ body: |
+ As the issue was labeled with `awaiting-reply`, but there has been no response in 14 days, this issue will be closed. If you have any questions, you can comment/reply.
diff --git a/.github/workflows/issue-labeled.yml b/.github/workflows/issue-labeled.yml
new file mode 100644
index 000000000..584879dd8
--- /dev/null
+++ b/.github/workflows/issue-labeled.yml
@@ -0,0 +1,26 @@
+name: Issue Labeled
+
+on:
+ issues:
+ types: [labeled]
+
+permissions:
+ contents: read
+
+jobs:
+ issue-labeled:
+ permissions:
+ # allow actions-cool/issues-helper to update issues and PRs
+ issues: write
+ pull-requests: write
+ if: github.repository == 'twbs/bootstrap'
+ runs-on: ubuntu-latest
+ steps:
+ - name: awaiting reply
+ if: github.event.label.name == 'needs-example'
+ uses: actions-cool/issues-helper@v3
+ with:
+ actions: "create-comment"
+ token: ${{ secrets.GITHUB_TOKEN }}
+ body: |
+ Hello @${{ github.event.issue.user.login }}. Bug reports must include a **live demo** of the issue. Per our [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md), please create a reduced test case on [CodePen](https://codepen.io/) or [StackBlitz](https://stackblitz.com/) and report back with your link, Bootstrap version, and specific browser and Operating System details.
diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml
index 1f03d8cc5..1b672aa30 100644
--- a/.github/workflows/js.yml
+++ b/.github/workflows/js.yml
@@ -2,31 +2,37 @@ name: JS Tests
on:
push:
- branches-ignore:
- - "dependabot/**"
+ branches:
+ - main
pull_request:
+ workflow_dispatch:
env:
FORCE_COLOR: 2
+ NODE: 20
+
+permissions:
+ contents: read
jobs:
run:
- name: Node ${{ matrix.node }}
+ permissions:
+ # allow coverallsapp/github-action to create new checks issues and fetch code
+ checks: write
+ contents: read
+ name: JS Tests
runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- node: [12, 14, 16]
-
steps:
- name: Clone repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Set up Node.js
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v4
with:
- node-version: ${{ matrix.node }}
+ node-version: ${{ env.NODE }}
cache: npm
- name: Install npm dependencies
@@ -39,8 +45,8 @@ jobs:
run: npm run js-test
- name: Run Coveralls
- uses: coverallsapp/[email protected]
- if: matrix.node == 16
+ uses: coverallsapp/github-action@v2
+ if: ${{ !github.event.repository.fork }}
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
path-to-lcov: "./js/coverage/lcov.info"
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index aef1341ed..213f9ec65 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -2,13 +2,17 @@ name: Lint
on:
push:
- branches-ignore:
- - "dependabot/**"
+ branches:
+ - main
pull_request:
+ workflow_dispatch:
env:
FORCE_COLOR: 2
- NODE: 16
+ NODE: 20
+
+permissions:
+ contents: read
jobs:
lint:
@@ -16,10 +20,12 @@ jobs:
steps:
- name: Clone repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Set up Node.js
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE }}"
cache: npm
diff --git a/.github/workflows/node-sass.yml b/.github/workflows/node-sass.yml
index 36c4e1c18..493cc35fd 100644
--- a/.github/workflows/node-sass.yml
+++ b/.github/workflows/node-sass.yml
@@ -2,13 +2,17 @@ name: CSS (node-sass)
on:
push:
- branches-ignore:
- - "dependabot/**"
+ branches:
+ - main
pull_request:
+ workflow_dispatch:
env:
FORCE_COLOR: 2
- NODE: 16
+ NODE: 20
+
+permissions:
+ contents: read
jobs:
css:
@@ -16,10 +20,12 @@ jobs:
steps:
- name: Clone repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Set up Node.js
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE }}"
@@ -28,3 +34,16 @@ jobs:
npx --package node-sass@latest node-sass --version
npx --package node-sass@latest node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/ -o dist-sass/css/
ls -Al dist-sass/css
+
+ - name: Check built CSS files for Sass variables
+ shell: bash
+ run: |
+ SASS_VARS_FOUND=$(find "dist-sass/css/" -type f -name "*.css" -print0 | xargs -0 --no-run-if-empty grep -F "\$" || true)
+ if [[ -z "$SASS_VARS_FOUND" ]]; then
+ echo "All good, no Sass variables found!"
+ exit 0
+ else
+ echo "Found $(echo "$SASS_VARS_FOUND" | wc -l | bc) Sass variables:"
+ echo "$SASS_VARS_FOUND"
+ exit 1
+ fi
diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml
index ab2f37694..813956af2 100644
--- a/.github/workflows/release-notes.yml
+++ b/.github/workflows/release-notes.yml
@@ -4,12 +4,20 @@ on:
push:
branches:
- main
+ workflow_dispatch:
+
+permissions:
+ contents: read
jobs:
update_release_draft:
+ permissions:
+ # allow release-drafter/release-drafter to create GitHub releases and add labels to PRs
+ contents: write
+ pull-requests: write
runs-on: ubuntu-latest
if: github.repository == 'twbs/bootstrap'
steps:
- - uses: release-drafter/release-drafter@v5
+ - uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}