Skip to content

Lag scripts

Lag scripts #3

name: Create empty GitHub repo and clone monorepo into it

Check failure on line 1 in .github/workflows/create-and-clone-repo.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/create-and-clone-repo.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: setup_env
on:
workflow_dispatch:
inputs:
repo_name:
description: "The name of the repository to create"
required: true
type: string
env:
GITHUB_TOKEN: ${{ secrets.DASK_ONBOARDING_PAT }}
REPO_NAME: ${{ inputs.repo_name }}
jobs:
setup_env:
runs-on: ubuntu-latest
create_and_clone_repo:
runs-on: ubuntu-latest
steps:
- name: Create empty repo
uses: actions/github-script@v7
with:
github-token: ${{ env.GITHUB_TOKEN }}
script: |
const octokit = new Octokit({
auth: 'YOUR-TOKEN'
})
await octokit.request('POST /orgs/{org}/repos', {
org: 'Kartverket',
name: '${{ env.REPO_NAME }}',
description: 'This is your first repository',
homepage: 'https://github.com',
'visibility': 'internal',
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
})