Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

[Auto] The jreleaser GitHub organization is added (#228) #139

[Auto] The jreleaser GitHub organization is added (#228)

[Auto] The jreleaser GitHub organization is added (#228) #139

---
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" }'