From 67934fbe815f7fee3d523eb9c1da09dfe7844ba8 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Sun, 14 Dec 2025 14:07:01 +0100 Subject: [PATCH] Refactor copy_change workflow to use matrix strategy --- .github/workflows/copy_change.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/copy_change.yml b/.github/workflows/copy_change.yml index 9ff05ed09..3046b9ec8 100644 --- a/.github/workflows/copy_change.yml +++ b/.github/workflows/copy_change.yml @@ -9,33 +9,27 @@ on: - 'I2CDEVICES.md' jobs: - copy_change: runs-on: ubuntu-latest if: github.repository == 'arendst/Tasmota' + strategy: + matrix: + file: + - name: 'I2CDEVICES.md' + message: 'I2CDevices.md changed' + - name: 'BUILDS.md' + message: 'Builds.md changed' steps: - uses: actions/checkout@v4 - - name: Push I2CDevices.md to https://github.com/Tasmota/docs + - name: Push ${{ matrix.file.name }} to docs repo uses: Jason2866/copy_file_to_another_repo_action@main env: API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} with: - source_file: 'I2CDEVICES.md' + source_file: ${{ matrix.file.name }} destination_repo: 'Tasmota/docs' destination_branch: 'development' destination_folder: 'docs' user_email: 'github-actions@github.com' user_name: 'github-actions' - commit_message: 'I2CDevices.md changed' - - name: Push Builds.md to https://github.com/Tasmota/docs - uses: Jason2866/copy_file_to_another_repo_action@main - env: - API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} - with: - source_file: 'BUILDS.md' - destination_repo: 'Tasmota/docs' - destination_branch: 'development' - destination_folder: 'docs' - user_email: 'github-actions@github.com' - user_name: 'github-actions' - commit_message: 'Builds.md changed' + commit_message: ${{ matrix.file.message }}