Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions .github/workflows/update-main-conf.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Update main.conf in PR
name: Update main.conf

on:
push:
branches-ignore:
- main
pull_request_target:
types:
- opened
Expand All @@ -15,11 +18,16 @@ permissions:

jobs:
update-main-conf:
if: github.event.pull_request.head.repo.full_name == github.repository
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest

steps:
- name: Check out branch
if: github.event_name == 'push'
uses: actions/checkout@v4

- name: Check out PR branch
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
Expand Down Expand Up @@ -90,7 +98,15 @@ jobs:
print('Updated main.conf')
PY

- name: Commit updated main.conf
- name: Commit updated main.conf on branch
if: github.event_name == 'push'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update generated main.conf"
file_pattern: main.conf

- name: Commit updated main.conf on PR branch
if: github.event_name == 'pull_request_target'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update generated main.conf"
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is a collection of all messages that are displayed in the server list. The

## Pull requests

We accept your submissions! You may clone this repository, add a new line in [edit-me.txt](edit-me.txt) and create a pull request in <https://github.com/BorderMC/motd/pulls>.
We accept your submissions! You may fork this repository, add a new line in [edit-me.txt](edit-me.txt) and create a pull request in <https://github.com/BorderMC/motd/pulls>.

When the pull request gets approved, Github will update [main.conf](main.conf) to match [edit-me.txt](edit-me.txt).

Expand All @@ -19,7 +19,8 @@ To avoid controversy or inappropriate sentences, the guideline rules below will

## How to contribute

- Clone project using `git clone https://github.com/BorderMC/motd.git`
- Fork this repository
- Clone your fork using `git clone https://github.com/<yourusername>/motd.git`
- Read [the rules](#rules)
- Edit [edit-me.txt](edit-me.txt)
- Make a branch with `git branch <yourusername>/<description>` for example `git branch pernio/nether-reset-info`
Expand Down
5 changes: 4 additions & 1 deletion edit-me.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ This message has been claimed
Server has not collapsed yet
Probably stable
Please remain inside the borders
Nothing personal, just geopolitics
Nothing personal, just geopolitics
We have wool
Non earthy
Nothing personal, just geopolitics
50 changes: 50 additions & 0 deletions main.conf
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,56 @@ motds=[
line1="<bold><red>BorderMC</red>"
line2="<gray>Beyond the border</gray>"
icon=random
},
{
line1="<bold><red>BorderMC</red>"
line2="<gray>Have you tried turning it off and on again?</gray>"
icon=random
},
{
line1="<bold><red>BorderMC</red>"
line2="<gray>We take no responsibility</gray>"
icon=random
},
{
line1="<bold><red>BorderMC</red>"
line2="<gray>This message has been claimed</gray>"
icon=random
},
{
line1="<bold><red>BorderMC</red>"
line2="<gray>Server has not collapsed yet</gray>"
icon=random
},
{
line1="<bold><red>BorderMC</red>"
line2="<gray>Probably stable</gray>"
icon=random
},
{
line1="<bold><red>BorderMC</red>"
line2="<gray>Please remain inside the borders</gray>"
icon=random
},
{
line1="<bold><red>BorderMC</red>"
line2="<gray>Nothing personal, just geopolitics</gray>"
icon=random
},
{
line1="<bold><red>BorderMC</red>"
line2="<gray>We have wool</gray>"
icon=random
},
{
line1="<bold><red>BorderMC</red>"
line2="<gray>Non earthy</gray>"
icon=random
},
{
line1="<bold><red>BorderMC</red>"
line2="<gray>Nothing personal, just geopolitics</gray>"
icon=random
}
]

Expand Down