diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-04-20 10:16:26 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-04-20 10:25:44 +0900 |
commit | 2d301945f67edda6495224889f82251229661169 (patch) | |
tree | f9ba0d937c5c55893f995fdd379ebe969fba2518 | |
parent | 7821708c843b5d6a6f7b04f49bde6f649fd230bf (diff) | |
download | ruby-2d301945f67edda6495224889f82251229661169.tar.gz |
Run source file checks on all branches
-rw-r--r-- | .github/workflows/check_misc.yml | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/.github/workflows/check_misc.yml b/.github/workflows/check_misc.yml index a6820d7b6e..26b892c0a5 100644 --- a/.github/workflows/check_misc.yml +++ b/.github/workflows/check_misc.yml @@ -1,11 +1,5 @@ name: Miscellaneous checks -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - merge_group: - branches: [ "master" ] +on: [push, pull_request, merge_group] concurrency: group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }} @@ -38,12 +32,17 @@ jobs: done | grep -F . working-directory: include + - id: gems + run: true + if: ${{ github.ref == 'refs/heads/master' }} + - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 with: path: .downloaded-cache key: downloaded-cache-${{ github.sha }} restore-keys: | downloaded-cache + if: steps.gems.outcome == 'success' - name: Download previous gems list run: | @@ -51,6 +50,7 @@ jobs: mkdir -p .downloaded-cache ln -s .downloaded-cache/$data . curl -O -R -z ./$data https://stdgems.org/$data + if: steps.gems.outcome == 'success' - name: Make default gems list run: | @@ -69,16 +69,19 @@ jobs: f.puts gems end shell: ruby --disable=gems {0} + if: steps.gems.outcome == 'success' - name: Maintain updated gems list in NEWS run: | ruby tool/update-NEWS-gemlist.rb default + if: steps.gems.outcome == 'success' - name: Check diffs id: diff run: | git diff --color --no-ext-diff --ignore-submodules --exit-code NEWS.md continue-on-error: true + if: steps.gems.outcome == 'success' - name: Commit run: | git pull --ff-only origin ${GITHUB_REF#refs/heads/} |