Skip to content

Commit

Permalink
Merge pull request #3126 from AlchemyCMS/backport/7.1-stable/pr-3122
Browse files Browse the repository at this point in the history
[7.1-stable] CI: Run actions on ubuntu-22.04
  • Loading branch information
tvdeyen authored Jan 5, 2025
2 parents a814f19 + 8e41132 commit 9d67346
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
backport:
name: Backport
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# Only react to merged PRs for security reasons.
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
if: >
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/brakeman-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
brakeman-scan:
name: Brakeman Scan
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
check_yarn_lock:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Check yarn.lock
steps:
- uses: actions/checkout@v4
Expand All @@ -23,7 +23,7 @@ jobs:
outputs:
yarn_lock_changed: ${{ steps.changed-yarn-lock.outputs.any_changed }}
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Build JS packages
needs: check_yarn_lock
if: ${{ needs.check_yarn_lock.outputs.yarn_lock_changed }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [pull_request]

jobs:
Standard:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Lint Ruby files
run: bundle exec standardrb
ESLint:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Lint code
run: yarn eslint
Prettier:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
stale:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/stale@v5
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

jobs:
RSpec:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -105,9 +105,11 @@ jobs:
if: failure()
with:
name: Screenshots
path: spec/dummy/tmp/screenshots
path: |
spec/dummy/tmp/capybara
spec/dummy/tmp/screenshots
Jest:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
NODE_ENV: test
steps:
Expand Down
9 changes: 4 additions & 5 deletions app/models/concerns/alchemy/picture_thumbnails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,10 @@ def image_cropper_settings

# Show image cropping link for ingredient
def allow_image_cropping?
settings[:crop] && picture &&
picture.can_be_cropped_to?(
settings[:size],
settings[:upsample]
) && !!picture.image_file
settings[:crop] && picture&.can_be_cropped_to?(
settings[:size],
settings[:upsample]
) && !!picture.image_file
end

private
Expand Down

0 comments on commit 9d67346

Please sign in to comment.