From 28a0d601bf9a88d87d69b4ae530576e578bd1211 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Fri, 17 Dec 2021 12:04:47 -0500 Subject: [PATCH 1/4] On "main" push, repopulate the recipe archives --- .github/workflows/flex-update-archived.yml | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/flex-update-archived.yml diff --git a/.github/workflows/flex-update-archived.yml b/.github/workflows/flex-update-archived.yml new file mode 100644 index 000000000..b6abf1714 --- /dev/null +++ b/.github/workflows/flex-update-archived.yml @@ -0,0 +1,42 @@ +name: Update Flex endpoint + +on: + push: + branches: + - main +jobs: + flex-update-archived: + name: Update Flex Archives + 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 Archives + run: | + git switch master + + mkdir .github/archived + php .github/recipes-checker-main/run generate:archived-recipes . master .github/archived + + git switch flex/main + cp -a .github/archived . + git add archived/ + git commit -m 'Update Flex archives' || true + git push origin -f flex/main From 2405897b39bd06fbe857d0d63fa44b5a5bf2a223 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Fri, 17 Dec 2021 12:21:40 -0500 Subject: [PATCH 2/4] refactoring to be a callable action --- ...hived.yml => callable-flex-update-archived.yml} | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) rename .github/workflows/{flex-update-archived.yml => callable-flex-update-archived.yml} (82%) diff --git a/.github/workflows/flex-update-archived.yml b/.github/workflows/callable-flex-update-archived.yml similarity index 82% rename from .github/workflows/flex-update-archived.yml rename to .github/workflows/callable-flex-update-archived.yml index b6abf1714..401f92ae2 100644 --- a/.github/workflows/flex-update-archived.yml +++ b/.github/workflows/callable-flex-update-archived.yml @@ -1,9 +1,13 @@ name: Update Flex endpoint on: - push: - branches: - - main + workflow_call: + inputs: + branch: + default: main + required: false + type: string + jobs: flex-update-archived: name: Update Flex Archives @@ -30,10 +34,10 @@ jobs: - name: Update Flex Archives run: | - git switch master + git switch ${{ inputs.branch }} mkdir .github/archived - php .github/recipes-checker-main/run generate:archived-recipes . master .github/archived + php .github/recipes-checker-main/run generate:archived-recipes . ${{ inputs.branch }} .github/archived git switch flex/main cp -a .github/archived . From cfe8e22980d14c081d0b8088f836902711614151 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Fri, 17 Dec 2021 12:28:31 -0500 Subject: [PATCH 3/4] fixing default --- .github/workflows/callable-flex-update-archived.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/callable-flex-update-archived.yml b/.github/workflows/callable-flex-update-archived.yml index 401f92ae2..a76a40e93 100644 --- a/.github/workflows/callable-flex-update-archived.yml +++ b/.github/workflows/callable-flex-update-archived.yml @@ -4,7 +4,7 @@ on: workflow_call: inputs: branch: - default: main + default: master required: false type: string From 621d9e582ab013270fdca3f4a2b21094c9d5ec05 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Fri, 17 Dec 2021 12:31:45 -0500 Subject: [PATCH 4/4] updating name --- .github/workflows/callable-flex-update-archived.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/callable-flex-update-archived.yml b/.github/workflows/callable-flex-update-archived.yml index a76a40e93..c0fa3e04b 100644 --- a/.github/workflows/callable-flex-update-archived.yml +++ b/.github/workflows/callable-flex-update-archived.yml @@ -1,4 +1,4 @@ -name: Update Flex endpoint +name: Update Flex Archives on: workflow_call: