Repo creation #226
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Repo creation | |
on: | |
workflow_dispatch: | |
inputs: | |
repo_name: | |
description: 'Repository name' | |
required: true | |
template: | |
description: 'Template (eg. defi-wonderland/solidity-foundry-boilerplate)' | |
required: false | |
linear_project_code: | |
description: 'Linear project code (eg. BES)' | |
required: false | |
jobs: | |
create_repo: | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- name: Check out github repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- name: Install dependencies | |
run: yarn --frozen-lockfile --network-concurrency 1 | |
- name: Create repo steps | |
env: | |
GH_OWNER: ${{ vars.GH_OWNER }} | |
GH_APP_ID: ${{ vars.GH_APP_ID }} | |
GH_INSTALLATION_ID: ${{ secrets.GH_INSTALLATION_ID }} | |
GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
GH_REPO_NAME: ${{ github.event.inputs.repo_name }} | |
GH_USER_CREATOR: ${{ github.actor }} | |
GH_TEMPLATE: ${{ github.event.inputs.template }} | |
LINEAR_PROJECT_CODE: ${{ github.event.inputs.linear_project_code }} | |
run: yarn create-repo |