mirror of
https://github.com/symfony/recipes.git
synced 2026-09-12 07:36:30 +03:00
Add reusable workflows
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
name: Update Flex endpoint
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
branch:
|
||||
default: main
|
||||
required: false
|
||||
type: string
|
||||
contrib:
|
||||
required: false
|
||||
type: boolean
|
||||
versions_json:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
flex-update:
|
||||
name: Update Flex endpoint
|
||||
runs-on: Ubuntu-20.04
|
||||
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
id: checkout
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
-
|
||||
name: Install tools
|
||||
run: |
|
||||
git config --global user.email ""
|
||||
git config --global user.name "github-action[bot]"
|
||||
cd .github
|
||||
wget -q -O recipes-checker.zip https://codeload.github.com/symfony-tools/recipes-checker/zip/refs/heads/main
|
||||
unzip recipes-checker.zip
|
||||
cd recipes-checker-main
|
||||
composer install --ansi --no-dev
|
||||
|
||||
-
|
||||
name: Update Flex endpoint
|
||||
run: |
|
||||
mkdir .github/flex-endpoint
|
||||
git ls-tree HEAD */*/* | php .github/recipes-checker-main/run generate:flex-endpoint ${{ github.repository }} ${{ inputs.branch }} flex/main .github/flex-endpoint ${{ inputs.versions_json }} ${{ inputs.contrib && '--contrib' || '' }}
|
||||
git switch flex/main
|
||||
git rm -q *.json
|
||||
mv .github/flex-endpoint/*.json .
|
||||
git add *.json
|
||||
git commit -m 'Update Flex endpoint' || true
|
||||
git push origin -f flex/main
|
||||
Reference in New Issue
Block a user