Skip to content

Commit

Permalink
Add link to prefill all values to create the GitHub App.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudcosmonaut committed Mar 19, 2024
1 parent 8ac6f5e commit 5c1c0f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/init.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,11 @@ This app needs the following repository permissions only for **this** repository
- Administration: Read & Write (Setting up the GitHub Runner on the deployer VM)
- contents: Read & Write (Creating configuration files, and update workflow with deployer and library)
- Environments: Read & Write (Creating environments)
- Secrets: Read & Write
- Variables: Read & Write
- Secrets: Read & Write (Used to store secrets in the first step, as there's no App configuration yet)
- Variables: Read & Write (Used to store variables in the first step, as there's no App configuration yet)
- Workflows: Read & Write (Creating configuration files, and update workflow with deployer and library)

If you have organization owner permissions, you can use the following link and install an app automagically: https://github.com/settings/apps/new?name=sap-on-azure&description=Used%20to%20create%20environments,%20update%20and%20create%20secrets%20and%20variables%20for%20your%20SAP%20on%20Azure%20Setup.&callback=false&request_oauth_on_install=false&public=true&actions=read&administration=write&contents=write&environments=write&issues=write&metadata=read&secrets=write&actions_variables=write&workflows=write&webhook_active=false&events[]=check_run&events[]=check_suite

1. [Create a new GitHub App](https://github.com/settings/apps/new)
- GitHub App name: SAP Deployer
- Homepage URL: @@REPO@@
- Webhook active: No
- Repository Permissions: Administration, Environments, Secrets, Actions
- Click on `Create GitHub App`
1. You can use the following link to create the app requirements automagically: https://github.com/settings/apps/new?name=@@OWNER@@-sap-on-azure&description=Used%20to%20create%20environments,%20update%20and%20create%20secrets%20and%20variables%20for%20your%20SAP%20on%20Azure%20Setup.&callback=false&request_oauth_on_install=false&public=true&actions=read&administration=write&contents=write&environments=write&issues=write&secrets=write&actions_variables=write&workflows=write&webhook_active=false&events[]=check_run&events[]=check_suite

2. Generate a private key
- Click on `Generate a private key`
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@ jobs:
gh label create link-azure
gh label create create-environment
cat .github/workflows/init.tpl | sed "s|@@REPO@@|${{ github.server_url }}/${{ github.repository }}|g" | \
gh issue create -t "Create GitHub App" -F - -l "setup-app"
owner=$(echo ${{ github.repository }} | cut -d '/' -f 1)
cat .github/workflows/init.tpl \
| sed "s|@@REPO@@|${{ github.server_url }}/${{ github.repository }}|g" \
| sed "s|@@OWNER@@|${owner}|g" \
| gh issue create -t "Create GitHub App" -F - -l "setup-app"

0 comments on commit 5c1c0f4

Please sign in to comment.