Skip to content

Hourly build

Hourly build #37506

name: Hourly build
on:
schedule:
- cron: '0 * * * *' # run cron hourly
jobs:
build:
if: github.event_name == 'schedule' && github.repository == 'Roave/SecurityAdvisoriesBuilder'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Install PHP"
uses: "shivammathur/setup-php@2.30.4"
with:
coverage: "pcov"
php-version: "8.2"
ini-values: memory_limit=-1
tools: composer:v2, cs2pr
- name: "Cache dependencies"
uses: "actions/cache@v4"
with:
key: ${{ runner.os }}-node-${{ hashFiles('/composer.lock') }}
path: |
~/.composer/cache
vendor
- name: Install dependencies
run: composer install --no-progress --no-suggest
- name: Set up user name and email for git
run: |
git config --global user.email "$GIT_USER_EMAIL"
git config --global user.name "$GIT_USER_NAME"
env:
GIT_USER_EMAIL: ocramius@gmail.com
GIT_USER_NAME: Ocramius
- name: Build advisories
run: php build-conflicts.php
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push to "Roave/SecurityAdvisories"
run: |
cd build/roave-security-advisories
git push "https://${PUSH_GITHUB_TOKEN}:x-oauth-basic@github.com/Roave/SecurityAdvisories.git" latest latest:master
env:
PUSH_GITHUB_TOKEN: ${{ secrets.PUSH_GITHUB_TOKEN }}