Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Dispatch files and branches protection #9570

Dispatch files and branches protection

Dispatch files and branches protection #9570

name: Dispatch files and branches protection
on:
schedule:
# At minute 5 past every 4th hour
# https://crontab.guru/#5_*/4_*_*_*
- cron: '5 */4 * * *'
workflow_dispatch:
inputs:
projects:
description: 'Projects to dispatch files and branches protection, separated by spaces (empty means all)'
env:
REQUIRED_PHP_EXTENSIONS: redis
permissions:
contents: read
jobs:
dispatch:
name: PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- '8.2'
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
env:
APP_ENV: prod
APP_DEBUG: 0
REDIS_HOST: localhost
REDIS_PORT: 6379
GITHUB_OAUTH_TOKEN: ${{ secrets.OAUTH_TOKEN_GITHUB }}
DEV_KIT_TOKEN: ${{ secrets.DEV_KIT_TOKEN }}
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: ${{ env.REQUIRED_PHP_EXTENSIONS }}
coverage: none
tools: composer:v2
- name: Install Composer dependencies (locked)
uses: ramsey/composer-install@v3
with:
composer-options: --no-dev --classmap-authoritative
- name: Dump env
run: composer dump-env prod
- name: Dispatch files
run: bin/console dispatch:files ${{ github.event.inputs.projects }} --apply
- name: Dispatch branches protection
run: bin/console dispatch:branches-protection ${{ github.event.inputs.projects }} --apply