This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
chore: add gothinkster example apps #125
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: Updates the Jenkins repositories | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'repos.csv' | |
env: | |
GH_CLI_TOKEN: ${{ secrets.GH_CLI_TOKEN }} | |
jobs: | |
update-ingest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: detect org | |
run: | | |
echo '${{ github.event.commits[0].message }}' > commit.txt | |
COMMIT_TITLE=$(head -n 1 commit.txt) | |
rm commit.txt | |
ADDED_ORG=$(echo $COMMIT_TITLE| sed 's/\[Auto\] The \(.*\) GitHub organization is added\(.*\)$/\1/') | |
echo $ADDED_ORG | |
echo "ADDED_ORG=$ADDED_ORG" >> $GITHUB_ENV | |
echo "COMMIT_TITLE=$COMMIT_TITLE" >> $GITHUB_ENV | |
- name: update org | |
if: ${{ env.ADDED_ORG != env.COMMIT_TITLE }} | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: jenkins.yml | |
repo: moderneinc/moderne-cli | |
token: ${{ env.GH_CLI_TOKEN }} | |
inputs: '{ "csvUrl": "https://raw.githubusercontent.com/moderneinc/jenkins-ingest/main/repos.csv", "folder": "cli-ingest", "prefix": "${{ env.ADDED_ORG }}" }' | |
- name: update the entire list | |
if: ${{ env.ADDED_ORG == env.COMMIT_TITLE }} | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: jenkins.yml | |
token: ${{ env.GH_CLI_TOKEN }} | |
repo: moderneinc/moderne-cli | |
inputs: '{ "csvUrl": "https://raw.githubusercontent.com/moderneinc/jenkins-ingest/main/repos.csv", "folder": "cli-ingest" }' | |