Skip to content

Commit

Permalink
Add actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Rindula committed Apr 24, 2024
1 parent be0ade6 commit d9b22fb
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/callable-flex-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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@v3
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 }} main .github/flex-endpoint ${{ inputs.versions_json }} ${{ inputs.contrib && '--contrib' || '' }}
git switch main
git rm -q *.json
mv .github/flex-endpoint/*.json .
git add *.json
cp -a .github/flex-endpoint/archived .
git add archived/
php .github/recipes-checker-main/run generate:recipes-readme index.json ${{ inputs.contrib && '--contrib' || '' }} > RECIPES.md
git add RECIPES.md
git commit -m 'Update Flex endpoint' || true
git push origin -f main
16 changes: 16 additions & 0 deletions .github/workflows/flex-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Update Flex endpoint

on:
push:
branches:
- main

defaults:
run:
shell: bash

jobs:
call-flex-update:
uses: symfony/recipes/.github/workflows/callable-flex-update.yml@main
# with:
# versions_json: .github/versions.json

0 comments on commit d9b22fb

Please sign in to comment.