Skip to content

Repository Scaffolder #4

Repository Scaffolder

Repository Scaffolder #4

name: Repository Scaffolder
on:
workflow_dispatch:
inputs:
port_payload:
required: true
description: "Port's payload, including details for who triggered the action and general context (blueprint, run id, etc...)"
type: string
secrets:
GH_ORG_TOKEN:
required: true
PORT_CLIENT_ID:
required: true
PORT_CLIENT_SECRET:
required: true
jobs:
scaffold:
runs-on: ubuntu-22.04
steps:
- uses: PashmakGuru/port-labs-cookiecutter-gha@main
with:
portClientId: ${{ secrets.PORT_CLIENT_ID }}
portClientSecret: ${{ secrets.PORT_CLIENT_SECRET }}
token: ${{ secrets.GH_ORG_TOKEN }}
portRunId: ${{ fromJson(inputs.port_payload).context.runId }}
repositoryName: ${{ fromJson(inputs.port_payload).payload.properties.cookiecutter_repository_name }}
portUserInputs: ${{ toJson(fromJson(inputs.port_payload).payload.properties) }}
cookiecutterTemplate: ${{ github.server_url }}/${{ github.repository }}
templateDirectory: ${{ fromJson(inputs.port_payload).payload.properties.language }}
blueprintIdentifier: repository
organizationName: ${{ github.repository_owner }}