derberg / manage-files-in-multiple-repositories

GitHub Action that introduces support for global workflows. Global workflows are the one you update in just one repo and they are automatically updated in other repositories.
MIT License
51 stars 18 forks source link

Not able to replicate files between repositories #63

Open apetrovYa opened 11 months ago

apetrovYa commented 11 months ago

Description

This is the job for syncing the repositories:

name: Sync GitHub Directory Workflow

on:
  #  push:
  #    branches:
  #      - main
  workflow_dispatch:

jobs:
  sync-repositories:
    if: github.repository == my_org_name/terraform-module-template'
    runs-on:
      group: custom-runners
    outputs:
      repositories: ${{ steps.list-repositories.outputs.repositories }}
    steps:
      - uses: actions/checkout@v3
      - uses: derberg/manage-files-in-multiple-repositories@v2.0.0
        with:
          github_token: ${{ secrets.GH_API_TOKEN }}
          patterns_to_include: '.github'
          destination: '.github'
          # Repository Labels Very Important
          topics_to_include: terraform-module
          repos_to_ignore: terraform-module-template
          exclude_forked: true
          committer_username: ci
          committer_email: no-reply@github.com
          commit_message: "ci: replicating the .github directory from the terraform-module-template repository"

This is the log I get at run time:

Warning: Failed replicating files for this repo: Error: ENOENT: no such file or directory, unlink '/home/runner/_work/terraform-module-template/terraform-module-template/clones/terraform-aws-rds-pg-groups/.github/dependabot.yaml'

The GitHub token has the necessary permissions to be able to manage Git repositories within the organisation.

Much appreciated any help!

N.B. The GitHub runners are self-hosted in a Kubernetes cluster through the arc-gha-rs-controller Kubernetes controller.

derberg commented 5 months ago

such small log do not help much, can you share more, best if you run in debug mode https://github.com/derberg/manage-files-in-multiple-repositories/tree/main?tab=readme-ov-file#debug