DEV Community

Cover image for Auto change repo name with Github action
Tran Nguyen Thuong Truong
Tran Nguyen Thuong Truong

Posted on • Edited on

4 3

Auto change repo name with Github action

Introduction

  • I have just released repo that uses Github API and Github Action to watching to auto rename your repository through Variable Environment
  • After you click to the star repository button, the action workflow will be run, and after 60 seconds, the name and description of the repository will be updated to change.

Usage

  • 1 Create secret key ENV with name id RUN_TOKEN in setting -> developer setting
  • Create run.yml job file in .github/workflow folder
1. Default
  • Visit Autoname on Maket place
  • Click on Use latest version button
  • Copy the code below and paste it into your run.yml file
2. Self-host
name: "Run"

on:
  workflow_dispatch:
  watch:
    types: [started,fork]

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/cache@v2
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-
      - run: npm i
      - uses: ./
        with:
          githubToken: ${{ secrets.RUN_TOKEN }}
          actor: ${{ github.actor }}
Enter fullscreen mode Exit fullscreen mode

Options

  • See example action at here

AWS Q Developer image

Your AI Code Assistant

Implement features, document your code, or refactor your projects.
Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️