From ed05e1bc79800a4567ddceaab509c1bf72afcd62 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Mon, 30 Oct 2023 12:41:25 +0100 Subject: [PATCH 1/3] feat(templates): add workflow to update workflows from templates Signed-off-by: Richard Steinmetz --- workflow-templates/update-workflows.yml | 54 +++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 workflow-templates/update-workflows.yml diff --git a/workflow-templates/update-workflows.yml b/workflow-templates/update-workflows.yml new file mode 100644 index 00000000..b5949cf8 --- /dev/null +++ b/workflow-templates/update-workflows.yml @@ -0,0 +1,54 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Update all workflows from org templates + +on: + workflow_dispatch: + schedule: + # At 4:00 on Sundays + - cron: '0 4 * * 0' + +jobs: + update: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + branches: ["main", "stable3.2"] + #branches: ["main", "master", "stable27", "stable26", "stable25"] + + steps: + - name: Checkout repository + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + with: + ref: ${{ matrix.branches }} + + - name: Checkout workflows repository + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + with: + path: workflow-templates + repository: nextcloud/.github + + - name: Copy workflows + run: | + rsync -rv --existing --include="*/" --include="*.yml" --exclude="*" ./workflow-templates/workflow-templates/ ./.github/workflows/ + rm -r workflow-templates + + - name: Create Pull Request + uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 # v4 + with: + body: Automated update of all workflows from https://github.com/nextcloud/.github + commit-message: Update all workflows from templates + committer: GitHub + author: nextcloud-command + signoff: true + title: "[${{ matrix.branches }}] Update all workflows from templates" + #token: ${{ secrets.COMMAND_BOT_PAT }} + branch: automated/noid/${{ matrix.branches }}-update-workflows + labels: | + dependencies + 3. to review From a5460bfa497070b7e9a3a0ae7d183b9c74bf6931 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Wed, 1 Nov 2023 08:33:13 +0100 Subject: [PATCH 2/3] fixup! feat(templates): add workflow to update workflows from templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: John Molakvoæ Signed-off-by: Richard Steinmetz --- workflow-templates/update-workflows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/workflow-templates/update-workflows.yml b/workflow-templates/update-workflows.yml index b5949cf8..999abfea 100644 --- a/workflow-templates/update-workflows.yml +++ b/workflow-templates/update-workflows.yml @@ -52,3 +52,4 @@ jobs: labels: | dependencies 3. to review + automated From 9adbcca95f89bb1e9cd98a3e551102e0b789a608 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Wed, 1 Nov 2023 08:38:34 +0100 Subject: [PATCH 3/3] fixup! feat(templates): add workflow to update workflows from templates Co-authored-by: Simon L. Signed-off-by: Richard Steinmetz --- workflow-templates/update-workflows.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/workflow-templates/update-workflows.yml b/workflow-templates/update-workflows.yml index 999abfea..7b969555 100644 --- a/workflow-templates/update-workflows.yml +++ b/workflow-templates/update-workflows.yml @@ -18,8 +18,7 @@ jobs: strategy: fail-fast: false matrix: - branches: ["main", "stable3.2"] - #branches: ["main", "master", "stable27", "stable26", "stable25"] + branches: ["main", "master", "stable27", "stable26", "stable25"] steps: - name: Checkout repository