Skip to content

🧻 Rulička bot

🧻 Rulička bot #331

Workflow file for this run

name: 🧻 Rulička bot
on:
workflow_dispatch:
inputs:
filename:
description: 'Filename (without extension)'
required: true
default: ''
content:
description: 'Content (JSON data)'
required: true
default: ''
title:
description: 'Business name'
required: true
default: ''
jobs:
create_json:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Create a json file
run: |
cd _toilets
echo '${{ github.event.inputs.content }}' > ${{ github.event.inputs.filename }}.json
cat ${{ github.event.inputs.filename }}.json
- name: Create a pull request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PAT }}
commit-message: Add ${{ github.event.inputs.filename }}.json toilet
committer: Rulicka [Bot] <[email protected]>
author: Rulica <[email protected]>
signoff: false
branch: new-toilet-${{ github.event.inputs.filename }}
delete-branch: true
title: 'A new toilet request: ${{ github.event.inputs.title }}'
body: |
| KEY | VALUE |
| ------ | ---------- |
| placeName | **${{ fromJSON(github.event.inputs.content).placeName }}** |
| coords | `${{ fromJSON(github.event.inputs.content).latitude }}` `${{ fromJSON(github.event.inputs.content).longtitude }}` |
| wayDescription | ${{ fromJSON(github.event.inputs.content).wayDescription }} |
| toiletType | ${{ fromJSON(github.event.inputs.content).toiletType }} |
| comment | ${{ fromJSON(github.event.inputs.content).comment }} |
| nickName | ${{ fromJSON(github.event.inputs.content).nickName }} |
| timeStamp | ${{ fromJSON(github.event.inputs.content).timeStamp }} |
Filename: ${{ github.event.inputs.filename }}.json
```json
${{ toJSON(fromJSON(github.event.inputs.content)) }}
```
labels: |
toilet
reviewers: petrkucerak
draft: false