Nextcloud workflow templates repository
Перейти к файлу
Joas Schilling 7f74292c15
chore: readd old colleague account
2024-11-07 05:18:16 +01:00
.github chore(deps): Bump actions/checkout in /.github/workflows 2024-10-28 03:23:01 +00:00
LICENSES fix: REUSE compliance 2024-10-02 10:25:38 +02:00
profile
screenshots
workflow-templates chore(deps): Bump codecov/codecov-action in /workflow-templates 2024-10-23 00:57:41 +00:00
.editorconfig
CONTRIBUTING.md
README.md
REUSE.toml chore: Update reuse to v4 and migrate to toml definitions 2024-07-04 21:36:19 +02:00
SECURITY.md fix(security): Less passive 2024-09-24 13:25:12 +02:00
non-community-usernames.txt chore: readd old colleague account 2024-11-07 05:18:16 +01:00
non-community-usernames.txt.license feat: Create non-community-usernames.txt 2024-05-07 09:31:13 +02:00

README.md

This repository contains Nextcloud's workflow templates

Setup a new template on your repository

When creating a new workflow on your repository, you will see templates originating from here. https://github.com/nextcloud/viewer/actions/new

image

Auto-update repositories

For each template, you can propagate them on all the repos that use it.

  1. Go into https://github.com/nextcloud/.github/actions/workflows/dispatch-workflow.yml
  2. Enter the name of the workflow you want to dispatch
  3. Enter the page you want to execute (100 are done per page, so check the number of repositories, current is 260 so run for page: 1, 2 and 3)

image

  1. Wait for the actions to finish and see the checkout the pull requests

Update workflows with a script

You can also run the following shell script on your machine to update all workflows of an app. It should be run inside the cloned repository of an app and requires rsync to be installed.

⚠️ Do not forget to check the diff for unwanted changes before committing, especially when updating the workflows on stable branches!

#!/bin/sh

# Update GitHub workflows from the Nextcloud template repository.
# This script is meant to be run from the root of the repository.

# Sanity check
[ ! -d ./.github/workflows/ ] && echo "Error: .github/workflows does not exist" && exit 1

# Clone template repository
temp="$(mktemp -d)"
git clone --depth=1 https://github.com/nextcloud/.github.git "$temp"

# Update workflows
rsync -vr \
    --existing \
    --include='*/' \
    --include='*.yml' \
    --exclude='*' \
    "$temp/workflow-templates/" \
    ./.github/workflows/

# Cleanup
rm -rf "$temp"