Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.2-stable] CI: Run actions on ubuntu-22.04 #3125

Merged
merged 3 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -19,7 +19,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
14 changes: 8 additions & 6 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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 @@ -30,7 +30,7 @@ jobs:
yarn_lock_changed: ${{ steps.changed-yarn-lock.outputs.any_changed }}

build_javascript:
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 == 'true'
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
RSpec:
needs: [check_yarn_lock, build_javascript]
if: ${{ success('check_yarn_lock') && !failure('build_javascript') }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -160,10 +160,12 @@ jobs:
if: failure()
with:
name: Screenshots
path: spec/dummy/tmp/screenshots
path: |
spec/dummy/tmp/capybara
spec/dummy/tmp/screenshots

PushJavascript:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [check_yarn_lock, RSpec]
if: github.event_name == 'pull_request'
steps:
Expand Down Expand Up @@ -195,7 +197,7 @@ jobs:
branch: ${{ github.head_ref }}

Jest:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
NODE_ENV: test
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:

jobs:
Standard:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -20,7 +20,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@v4
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Lint code
run: yarn eslint
Prettier:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
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
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