Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create GitHub App called "ImagingDataCommons App" #6

Open
jcfr opened this issue Mar 15, 2024 · 1 comment
Open

Create GitHub App called "ImagingDataCommons App" #6

jcfr opened this issue Mar 15, 2024 · 1 comment

Comments

@jcfr
Copy link
Collaborator

jcfr commented Mar 15, 2024

To support creating authoring commits and pull-requests from GitHub workflow like bump-idc-index-data-version.yml discussed in #5, consider the following:

  1. Go to https://github.com/organizations/ImagingDataCommons/settings/apps

  2. Click New GitHub App

  3. Enter the following details:

    GitHub App Name ImagingDataCommons App
    Description This ImagingDataCommons GitHub App supports the automation of commits and pull requests creation in GitHub workflow.
    Homepage URL https://portal.imaging.datacommons.cancer.gov/
    Webhook Disable
    Where can this GitHub App be installed? Only on this account (default)
    Repository permmissions Contents set to "Read And Write", Metadata set to "Read-only", Pull requests set to "Read And Write"
    Organization permissions Members set to "Read only"
    Account permissions None

This will allow to leverage the actions/create-github-app-token1 along with peter-evans/create-pull-request. For a similar example, see the workflow2 we created in NA-MIC/ProjectWeek (it using tibdex/github-app-token now superseded by actions/create-github-app-token but that should be enough to move forward)

Footnotes

  1. https://github.com/actions/create-github-app-token

  2. https://github.com/NA-MIC/ProjectWeek/blob/6e5d245d619dd2d4a021973246b9666cd6368291/.github/workflows/project-page-pull-request.yml#L210-L232

@jcfr
Copy link
Collaborator Author

jcfr commented Mar 16, 2024

Once the app is created:

  1. generate client secret (keep track of the value in your password manager/secure notes)
  2. create a private key (a file will be downloaded, also keep track of it in your password manager/secure notes)
  3. install the app following these instruction. See https://docs.github.com/en/apps/using-github-apps/installing-your-own-github-app#installing-your-own-github-app
  4. Add organization level1 secrets and variables
    • IDC_APP_ID as a regular variable
    • IDC_APP_PRIVATE_KEY as a secret variable available only to idc-index-data

Footnotes

  1. https://github.com/organizations/ImagingDataCommons/settings/secrets/actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant