ci: drop ubuntu-18.04, add 22.04, latest (#776)

This commit is contained in:
Sardorbek Imomaliev 2022-09-04 18:40:50 +05:00 committed by GitHub
parent 765cf1194e
commit 2eea5d7a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 49 additions and 29 deletions

View File

@ -8,7 +8,7 @@ on:
jobs: jobs:
CodeQL-Build: CodeQL-Build:
runs-on: ubuntu-18.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -10,7 +10,7 @@ permissions:
jobs: jobs:
dependency-review: dependency-review:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/dependency-review-action@v2 - uses: actions/dependency-review-action@v2

View File

@ -25,7 +25,7 @@ on:
jobs: jobs:
dev-image-test: dev-image-test:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Login to Packages - name: Login to Packages

View File

@ -17,7 +17,7 @@ permissions:
jobs: jobs:
comment: comment:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -6,7 +6,7 @@ on:
jobs: jobs:
triage: triage:
runs-on: ubuntu-18.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/labeler@v4 - uses: actions/labeler@v4
with: with:

View File

@ -4,7 +4,7 @@ on: page_build
jobs: jobs:
pages-status-check: pages-status-check:
runs-on: ubuntu-18.04 runs-on: ubuntu-22.04
steps: steps:
- name: check status - name: check status
run: | run: |

View File

@ -7,7 +7,7 @@ on:
jobs: jobs:
purge: purge:
runs-on: ubuntu-18.04 runs-on: ubuntu-22.04
steps: steps:
- run: > - run: >

View File

@ -7,7 +7,7 @@ on:
jobs: jobs:
release: release:
runs-on: ubuntu-18.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
# https://github.com/peaceiris/workflows/blob/main/create-release-npm/action.yml # https://github.com/peaceiris/workflows/blob/main/create-release-npm/action.yml

View File

@ -19,8 +19,9 @@ jobs:
strategy: strategy:
matrix: matrix:
os: os:
- 'ubuntu-22.04'
- 'ubuntu-20.04' - 'ubuntu-20.04'
- 'ubuntu-18.04' - 'ubuntu-latest'
- 'macos-latest' - 'macos-latest'
- 'windows-latest' - 'windows-latest'
permissions: permissions:
@ -51,7 +52,7 @@ jobs:
- run: npm ci --ignore-scripts - run: npm ci --ignore-scripts
- name: npm audit - name: npm audit
if: startsWith(matrix.os, 'ubuntu-18.04') if: startsWith(matrix.os, 'ubuntu-22.04')
run: | run: |
npm audit > ./audit.log || true npm audit > ./audit.log || true
if ! [ "$(cat ./audit.log | wc -l)" = 1 ]; then if ! [ "$(cat ./audit.log | wc -l)" = 1 ]; then
@ -60,11 +61,11 @@ jobs:
rm ./audit.log rm ./audit.log
- name: Run prettier - name: Run prettier
if: startsWith(matrix.os, 'ubuntu-18.04') if: startsWith(matrix.os, 'ubuntu-22.04')
run: npm run format:check run: npm run format:check
- name: Run eslint - name: Run eslint
if: startsWith(matrix.os, 'ubuntu-18.04') if: startsWith(matrix.os, 'ubuntu-22.04')
run: npm run lint run: npm run lint
- run: npm test - run: npm test
@ -99,7 +100,7 @@ jobs:
- name: Deploy - name: Deploy
if: | if: |
startsWith(matrix.os, 'ubuntu-18.04') && startsWith(matrix.os, 'ubuntu-latest') &&
github.ref == 'refs/heads/main' && github.event.repository.fork == false github.ref == 'refs/heads/main' && github.event.repository.fork == false
uses: ./ uses: ./
with: with:
@ -171,3 +172,21 @@ jobs:
user_name: 'github-actions[bot]' user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com' user_email: 'github-actions[bot]@users.noreply.github.com'
# commit_message: ${{ github.event.head_commit.message }} # commit_message: ${{ github.event.head_commit.message }}
- name: Deploy
if: |
startsWith(matrix.os, 'ubuntu-22.04') &&
github.ref == 'refs/heads/main' && github.event.repository.fork == false
uses: ./
with:
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages-ubuntu-22.04
publish_dir: ./test_projects/mdbook/book
# external_repository: ''
allow_empty_commit: true
# keep_files: true
# force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
# commit_message: ${{ github.event.head_commit.message }}

View File

@ -6,7 +6,7 @@ on:
jobs: jobs:
update: update:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
timeout-minutes: 1 timeout-minutes: 1
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -65,8 +65,9 @@ All Actions runners: Linux (Ubuntu), macOS, and Windows are supported.
| runs-on | `github_token` | `deploy_key` | `personal_token` | | runs-on | `github_token` | `deploy_key` | `personal_token` |
|---|:---:|:---:|:---:| |---|:---:|:---:|:---:|
| ubuntu-22.04 | ✅️ | ✅️ | ✅️ |
| ubuntu-20.04 | ✅️ | ✅️ | ✅️ | | ubuntu-20.04 | ✅️ | ✅️ | ✅️ |
| ubuntu-18.04 | ✅️ | ✅️ | ✅️ | | ubuntu-latest | ✅️ | ✅️ | ✅️ |
| macos-latest | ✅️ | ✅️ | ✅️ | | macos-latest | ✅️ | ✅️ | ✅️ |
| windows-latest | ✅️ | (2) | ✅️ | | windows-latest | ✅️ | (2) | ✅️ |
@ -149,7 +150,7 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
concurrency: concurrency:
@ -170,8 +171,8 @@ jobs:
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
# If you're changing the branch from main, # If you're changing the branch from main,
# also change the `main` in `refs/heads/main` # also change the `main` in `refs/heads/main`
# below accordingly. # below accordingly.
if: ${{ github.ref == 'refs/heads/main' }} if: ${{ github.ref == 'refs/heads/main' }}
with: with:
@ -489,7 +490,7 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
concurrency: concurrency:
@ -641,7 +642,7 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
concurrency: concurrency:
@ -683,7 +684,7 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
concurrency: concurrency:
@ -733,7 +734,7 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
concurrency: concurrency:
@ -785,7 +786,7 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
concurrency: concurrency:
@ -842,7 +843,7 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
concurrency: concurrency:
@ -897,7 +898,7 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
concurrency: concurrency:
@ -957,7 +958,7 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
concurrency: concurrency:
@ -1019,7 +1020,7 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
concurrency: concurrency:
@ -1064,7 +1065,7 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
concurrency: concurrency:
@ -1110,7 +1111,7 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
concurrency: concurrency: