From 2eea5d7a12ebcecf9d96a638de7649164fafddeb Mon Sep 17 00:00:00 2001 From: Sardorbek Imomaliev Date: Sun, 4 Sep 2022 18:40:50 +0500 Subject: [PATCH] ci: drop ubuntu-18.04, add 22.04, latest (#776) --- .github/workflows/codeql.yml | 2 +- .github/workflows/dependency-review.yml | 2 +- .github/workflows/dev-image.yml | 2 +- .github/workflows/label-commenter.yml | 2 +- .github/workflows/labeler.yml | 2 +- .github/workflows/pages-status-check.yml | 2 +- .../workflows/purge-readme-image-cache.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 29 ++++++++++++++--- .github/workflows/update-major-tag.yml | 2 +- README.md | 31 ++++++++++--------- 11 files changed, 49 insertions(+), 29 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7bedcb8..8aa90cf 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -8,7 +8,7 @@ on: jobs: CodeQL-Build: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index a469d3e..3323dd5 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -10,7 +10,7 @@ permissions: jobs: dependency-review: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - uses: actions/dependency-review-action@v2 diff --git a/.github/workflows/dev-image.yml b/.github/workflows/dev-image.yml index b92f6d1..70fd6bf 100644 --- a/.github/workflows/dev-image.yml +++ b/.github/workflows/dev-image.yml @@ -25,7 +25,7 @@ on: jobs: dev-image-test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Login to Packages diff --git a/.github/workflows/label-commenter.yml b/.github/workflows/label-commenter.yml index 143ff8c..4c294ca 100644 --- a/.github/workflows/label-commenter.yml +++ b/.github/workflows/label-commenter.yml @@ -17,7 +17,7 @@ permissions: jobs: comment: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 8a8da4e..78ea179 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -6,7 +6,7 @@ on: jobs: triage: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/labeler@v4 with: diff --git a/.github/workflows/pages-status-check.yml b/.github/workflows/pages-status-check.yml index 578b5bf..4f08a1b 100644 --- a/.github/workflows/pages-status-check.yml +++ b/.github/workflows/pages-status-check.yml @@ -4,7 +4,7 @@ on: page_build jobs: pages-status-check: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - name: check status run: | diff --git a/.github/workflows/purge-readme-image-cache.yml b/.github/workflows/purge-readme-image-cache.yml index 176629d..b6abe53 100644 --- a/.github/workflows/purge-readme-image-cache.yml +++ b/.github/workflows/purge-readme-image-cache.yml @@ -7,7 +7,7 @@ on: jobs: purge: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - run: > diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aca13bf..e8fe448 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: jobs: release: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 # https://github.com/peaceiris/workflows/blob/main/create-release-npm/action.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9627fdf..974ed52 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }} diff --git a/.github/workflows/update-major-tag.yml b/.github/workflows/update-major-tag.yml index 360a677..5f23ff3 100644 --- a/.github/workflows/update-major-tag.yml +++ b/.github/workflows/update-major-tag.yml @@ -6,7 +6,7 @@ on: jobs: update: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 1 steps: - uses: actions/checkout@v3 diff --git a/README.md b/README.md index ba6eb75..1334aa9 100644 --- a/README.md +++ b/README.md @@ -65,8 +65,9 @@ All Actions runners: Linux (Ubuntu), macOS, and Windows are supported. | runs-on | `github_token` | `deploy_key` | `personal_token` | |---|:---:|:---:|:---:| +| ubuntu-22.04 | ✅️ | ✅️ | ✅️ | | ubuntu-20.04 | ✅️ | ✅️ | ✅️ | -| ubuntu-18.04 | ✅️ | ✅️ | ✅️ | +| ubuntu-latest | ✅️ | ✅️ | ✅️ | | macos-latest | ✅️ | ✅️ | ✅️ | | windows-latest | ✅️ | (2) | ✅️ | @@ -149,7 +150,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: write concurrency: @@ -170,8 +171,8 @@ jobs: - name: Deploy uses: peaceiris/actions-gh-pages@v3 - # If you're changing the branch from main, - # also change the `main` in `refs/heads/main` + # If you're changing the branch from main, + # also change the `main` in `refs/heads/main` # below accordingly. if: ${{ github.ref == 'refs/heads/main' }} with: @@ -489,7 +490,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: write concurrency: @@ -641,7 +642,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: write concurrency: @@ -683,7 +684,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: write concurrency: @@ -733,7 +734,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: write concurrency: @@ -785,7 +786,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: write concurrency: @@ -842,7 +843,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: write concurrency: @@ -897,7 +898,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: write concurrency: @@ -957,7 +958,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: write concurrency: @@ -1019,7 +1020,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: write concurrency: @@ -1064,7 +1065,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: write concurrency: @@ -1110,7 +1111,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: contents: write concurrency: