This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
Add a new OSS GitHub org to the Moderne public tenant #115
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: Add a new OSS GitHub org to the Moderne public tenant | |
on: | |
workflow_dispatch: | |
inputs: | |
org: | |
description: 'The GH org' | |
required: true | |
env: | |
GITHUB_TOKEN: ${{secrets.PAT}} | |
jobs: | |
ingest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Adds an org | |
run: ./add-github-organization.sh ${{ inputs.org }} | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
branch: add/${{ inputs.org }} | |
token: ${{secrets.PAT}} | |
title: "[Auto] The ${{ inputs.org }} GitHub organization is added" | |
body: | | |
[Auto] The ${{ inputs.org }} GitHub organization is added. | |
commit-message: "[Auto] The ${{ inputs.org }} GitHub organization is added" | |
labels: enhancement | |
- name: Check outputs | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |