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
11 changed files with 49 additions and 29 deletions

View File

@@ -19,8 +19,9 @@ jobs:
strategy:
matrix:
os:
- 'ubuntu-22.04'
- 'ubuntu-20.04'
- 'ubuntu-18.04'
- 'ubuntu-latest'
- 'macos-latest'
- 'windows-latest'
permissions:
@@ -51,7 +52,7 @@ jobs:
- run: npm ci --ignore-scripts
- name: npm audit
if: startsWith(matrix.os, 'ubuntu-18.04')
if: startsWith(matrix.os, 'ubuntu-22.04')
run: |
npm audit > ./audit.log || true
if ! [ "$(cat ./audit.log | wc -l)" = 1 ]; then
@@ -60,11 +61,11 @@ jobs:
rm ./audit.log
- name: Run prettier
if: startsWith(matrix.os, 'ubuntu-18.04')
if: startsWith(matrix.os, 'ubuntu-22.04')
run: npm run format:check
- name: Run eslint
if: startsWith(matrix.os, 'ubuntu-18.04')
if: startsWith(matrix.os, 'ubuntu-22.04')
run: npm run lint
- run: npm test
@@ -99,7 +100,7 @@ jobs:
- name: Deploy
if: |
startsWith(matrix.os, 'ubuntu-18.04') &&
startsWith(matrix.os, 'ubuntu-latest') &&
github.ref == 'refs/heads/main' && github.event.repository.fork == false
uses: ./
with:
@@ -171,3 +172,21 @@ jobs:
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
# 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 }}