renovate[bot] 0b5d63c547
chore(deps): update actions/cache action to v4 (#2906)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/cache](https://togithub.com/actions/cache) | action | major |
`v3` -> `v4` |

---

### Release Notes

<details>
<summary>actions/cache (actions/cache)</summary>

### [`v4`](https://togithub.com/actions/cache/compare/v3...v4)

[Compare Source](https://togithub.com/actions/cache/compare/v3...v4)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/libretime/libretime).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-19 17:05:01 +00:00

120 lines
2.9 KiB
YAML

name: Legacy
on:
workflow_dispatch:
push:
branches: [main, stable-*]
paths:
- .github/workflows/legacy.yml
- api/**
- legacy/**
pull_request:
branches: [main, stable-*]
paths:
- .github/workflows/legacy.yml
- api/**
- legacy/**
schedule:
- cron: 0 1 * * 1
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php-version: "7.4" # Focal, Bullseye
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Lint
run: make lint
working-directory: legacy
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php-version: "7.4" # Focal, Bullseye
env:
ENVIRONMENT: testing
steps:
- uses: actions/checkout@v4
- name: Setup PostgreSQL
run: |
sudo systemctl start postgresql.service
pg_isready
sudo -u postgres psql -c 'CREATE DATABASE libretime;'
sudo -u postgres psql -c "CREATE USER libretime WITH PASSWORD 'libretime';"
sudo -u postgres psql -c 'GRANT CONNECT ON DATABASE libretime TO libretime;'
sudo -u postgres psql -c 'ALTER USER libretime CREATEDB;'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Run tests
run: make test
working-directory: legacy
locale:
runs-on: ubuntu-latest
if: >
github.repository_owner == 'libretime' && (
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch'
)
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.LIBRETIME_BOT_TOKEN }}
- name: Install dependencies
run: |
DEBIAN_FRONTEND=noninteractive sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y gettext
- name: Update locales
run: |
git config --global user.name "libretime-bot"
git config --global user.email "libretime-bot@users.noreply.github.com"
git pull
make -C legacy/locale update
git add legacy/locale
git diff-index --quiet HEAD -- legacy/locale || {
git commit --message "chore(legacy): update locales"
git push
}