Skip to content

Rename from matrix-ui-plugin-boilerplate-24 to new project name #1

Rename from matrix-ui-plugin-boilerplate-24 to new project name

Rename from matrix-ui-plugin-boilerplate-24 to new project name #1

Workflow file for this run

name: Rename from matrix-ui-plugin-boilerplate-24 to new project name
on:
workflow_dispatch:
inputs:
prefix:
description: 'Please specify a 3 letters prefix for your plugin '
required: true
type: string
jobs:
rename-project:
if: ${{ github.repository != 'MatrixRequirements/matrix-ui-plugin-boilerplate-24' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# by default, it uses a depth of 1
# this fetches all history so that we can read each commit
fetch-depth: 0
ref: ${{ github.head_ref }}
- run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}' | tr '-' '_' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
shell: bash
- run: echo "REPOSITORY_URLNAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
shell: bash
- run: echo "REPOSITORY_OWNER=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV
shell: bash
- name: Rename the project
run: |
echo Renaming the project with -a ${{ env.REPOSITORY_OWNER }} -n ${{ env.REPOSITORY_NAME }} -p ${{ inputs.prefix }} -u ${{ env.REPOSITORY_URLNAME }} -d "Awesome ${{ env.REPOSITORY_NAME }} created by ${{ env.REPOSITORY_OWNER }}"
bash .github/rename_project.sh -a ${{ env.REPOSITORY_OWNER }} -n ${{ env.REPOSITORY_NAME }} -p ${{ inputs.prefix }} -u ${{ env.REPOSITORY_URLNAME }} -d "Awesome ${{ env.REPOSITORY_NAME }} created by ${{ env.REPOSITORY_OWNER }} "
- name: Push to master
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}