Add new mod: TeamMitis.Liaison #81
Workflow file for this run
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: Check New Mod | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
branches: [master, source, main] | |
issue_comment: | |
types: [created] | |
permissions: | |
contents: read | |
pull-requests: write | |
checks: write | |
jobs: | |
check-new-mod: | |
runs-on: ubuntu-latest | |
env: | |
modUniqueName: "" | |
modRepo: "" | |
if: "${{ (github.event.comment && github.event.issue.pull_request && contains(github.event.issue.labels.*.name, 'add-mod') && startsWith(github.event.issue.title, 'Add new mod: ') && startsWith(github.event.comment.body, 'checker, retry')) || (github.event.pull_request && contains(github.event.pull_request.labels.*.name, 'add-mod') && startsWith(github.event.pull_request.title, 'Add new mod: ')) }}" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Mod Info | |
id: get-mod-info | |
run: | | |
tmp="${{ github.event.pull_request.title && github.event.pull_request.title || github.event.issue.title }}" | |
echo "modUniqueName=${tmp:13}" >> $GITHUB_ENV | |
pat="https://github.com/(.*)/?" | |
ser="${{ github.event.pull_request.body && github.event.pull_request.body || github.event.issue.body }}" | |
if [[ $ser =~ $pat ]]; then | |
echo "modRepo=${BASH_REMATCH[1]%/}" >> $GITHUB_ENV | |
fi | |
- name: Initial Comment | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
comment_tag: pending | |
mode: recreate | |
message: | | |
### :hourglass: Starting Mod Check | |
View the `Checks` tab for the status of this check. | |
You can retry this check anytime by commenting `checker, retry`. | |
- name: Check Mod | |
id: check-mod | |
continue-on-error: true | |
uses: Bwc9876/mods-checker@main | |
with: | |
sourceType: repo | |
source: ${{ env.modRepo }} | |
overrideName: Check of ${{ env.modUniqueName }} | |
expectedUniqueName: ${{ env.modUniqueName }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Final Comment | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
filePath: ./results.md | |
comment_tag: results | |
mode: recreate |