Skip to content

Github To Gitea Mirror

Actions
Python Script To Auto Trigger Gitea Mirror Using Github Action
1.1
Latest
StarΒ (34)

Gitea Mirror - Github Action

β„ΉοΈŽ This Action uses Github > Gitea Mirror Script. And The Arguments supported by that script is supported here to

Requirements

  • Self / Cloud Hosted Gitea Instance
  • Github Personal Access Token
  • Gitea Personal Access Token

Github Access Token Scopes

  • if you want to mirror private repos then select everything under Repo scope
  • if you want to mirror public repos then select repo.public_repo scope
  • if you want to mirror secret Gists then select gist scope

Why Github Action ? Can't This Script Run Inside Selfhosted Instance ?

Yes this script Github > Gitea Mirror Can be ran inside the selfhosted instance. but i created this action for few reasons

  • This action can be used for ppl how are not tech savvy
  • Personally i wanted to remove resource used by Github > Gitea Mirror Script
  • I think that there are some advantages when calling GithubAPI Inside an Github Action

βš™οΈ Configuration

Option Description
github.username Your Github Username
github.accesstoken Your Github Account's Personal Access Token
- -
gitea.host Selfhosted Gitea URL without / at the end
gitea.accesstoken Your Personal Access Token
gitea.username Account User Name
gitea.gist.prefix Custom Prefix For Repository When Mirroring Gists
gitea.gist.surfix Custom Prefix For Repository When Mirroring Gists
- -
repomap Remap A Repository To Diff User
gistsSource set to true to mirror all Gists Created By You
gistsStared set to true to mirror all Gists Stared By You
repositoryStared set to true to mirror all Repository Stared By You
repositorySource set to true to mirror all Repository Created By You
repositoryForked set to true to mirror all Repository Forked By You

Example Workflow File

Below workflow file triggers when anything is pushed to main branch or runs every Day or can be triggered manually Please do make sure to setup the Secrets

name: " ⏳  Gitea Mirror Setup"

on:
  workflow_dispatch:
 
  schedule:
    - cron: 0 0 * * *
  
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: varunsridharan/action-gitea-mirror@main
        name: " ⏳ Setting Up Mirror"
        with:
          gh_username: ${{ secrets.GH_USERNAME }}
          gh_accesstoken: ${{ secrets.GH_TOKEN }}
          gitea_host: ${{ secrets.GITEA_HOST }}
          gitea_username: ${{ secrets.GITEA_USERNAME }}
          gitea_accesstoken: ${{ secrets.GITEA_TOKEN }}
          gitea_gist_prefix: "gist"
          gitea_gist_surfix: ""
          gistsSource: true
          gistsStared: true
          repositoryStared: true
          repositorySource: true
          repositoryForked: true

πŸ“ Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Checkout CHANGELOG.md

🀝 Contributing

If you would like to help, please take a look at the list of issues.

πŸ“œ License & Conduct

πŸ“£ Feedback

  • ⭐ This repository if this project helped you! πŸ˜‰
  • Create An πŸ”§ Issue if you need help / found a bug

πŸ’° Sponsor

I fell in love with open-source in 2013 and there has been no looking back since! You can read more about me here. If you, or your company, use any of my projects or like what I’m doing, kindly consider backing me. I'm in this for the long run.

  • β˜• How about we get to know each other over coffee? Buy me a cup for just $9.99
  • β˜•οΈβ˜•οΈ How about buying me just 2 cups of coffee each month? You can do that for as little as $9.99
  • πŸ”° We love bettering open-source projects. Support 1-hour of open-source maintenance for $24.99 one-time?
  • πŸš€ Love open-source tools? Me too! How about supporting one hour of open-source development for just $49.99 one-time ?

Connect & Say πŸ‘‹


Built With β™₯ By Varun Sridharan


Github To Gitea Mirror is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Python Script To Auto Trigger Gitea Mirror Using Github Action
1.1
Latest

Github To Gitea Mirror is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.