mirror of
https://github.com/sorrycc/awesome-javascript.git
synced 2025-12-08 20:13:04 +00:00
chore(ci): update GitHub Actions and Ruby version (#910)
1. Updated GitHub Actions versions:
actions/checkout@v2 → actions/checkout@v4
actions/upload-artifact@v2 → actions/upload-artifact@v4
Updated Ruby version from 2.6 to 3.2 (since 2.6 is no longer supported).
2. Optimized workflow steps:
Moved setup-ruby after checkout for better execution order.
Added bundler-cache: true to setup-ruby to prevent redundant gem installations.
3. Improved awesome_bot installation:
Added --no-document flag to speed up installation.
4. Made validation step more resilient:
Added continue-on-error: true to validate to prevent workflow failure on link errors.
5. Adjusted artifact handling:
Used if: ${{ failure() }} to ensure artifacts are uploaded only if the validation fails.
This commit is contained in:
parent
6d17f734e4
commit
ff4dac0459
19
.github/workflows/validator.yml
vendored
19
.github/workflows/validator.yml
vendored
@ -11,7 +11,7 @@ on:
|
||||
- synchronize
|
||||
|
||||
env:
|
||||
RUBY_VERSION: '2.6'
|
||||
RUBY_VERSION: '3.2'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@ -22,30 +22,32 @@ jobs:
|
||||
name: Validator
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: checkout
|
||||
name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- id: setup-ruby
|
||||
name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ env.RUBY_VERSION }}
|
||||
|
||||
- id: checkout
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
bundler-cache: true
|
||||
|
||||
- id: install-gem
|
||||
name: Install gem
|
||||
run: |
|
||||
gem install awesome_bot
|
||||
gem install awesome_bot --no-document
|
||||
|
||||
- id: validate
|
||||
name: Validate
|
||||
continue-on-error: true
|
||||
run: |
|
||||
awesome_bot README.md --request-delay 0.5 --allow-timeout --allow-redirect
|
||||
|
||||
- id: upload-artifact
|
||||
name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
if-no-files-found: warn
|
||||
name: ab-results
|
||||
@ -53,4 +55,3 @@ jobs:
|
||||
ab-results-README.md.json
|
||||
ab-results-README.md-filtered.json
|
||||
ab-results-README.md-markdown-table.json
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user