Skip to content

fix: set ultraspice to nsfw: true #6

fix: set ultraspice to nsfw: true

fix: set ultraspice to nsfw: true #6

name: Compare PR to Main
on:
pull_request_target:
branches:
- main
jobs:
required-label-job:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
labels: "ready-for-review"
compare-pr-to-main:
runs-on: ubuntu-latest
needs: required-label-job
steps:
- name: Checkout `main` repository
uses: actions/checkout@v2
with:
ref: main
path: main
- name: Checkout PR repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
path: pr
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r pr/scripts/requirements.txt
- name: Extract the first 8 characters from the main and PR hash and store them as variables
run: |
echo "MAIN_HASH=$(echo ${{ github.sha }} | cut -c1-8)" >> "$GITHUB_ENV"
echo "PR_HASH=$(echo ${{ github.event.pull_request.base.sha }} | cut -c1-8)" >> "$GITHUB_ENV"
- name: Set output file name
run: |
echo "INFO_FILE_OUT=$(echo pr_diff_${{ env.MAIN_HASH }}_${{ env.PR_HASH }}.txt)" >> "$GITHUB_ENV"
- name: Calculate and print SHA hash of each stable_diffusion.json file
run: |
echo "SHA of main/stable_diffusion.json: $(sha256sum main/stable_diffusion.json)"
echo "SHA of pr/stable_diffusion.json: $(sha256sum pr/stable_diffusion.json)"
- name: Run comparison script
run: |
python pr/scripts/compare_pr_to_main.py --pr_path pr/stable_diffusion.json --main_path main/stable_diffusion.json --main_hash ${{ github.sha }} --pr_hash ${{ github.event.pull_request.base.sha }} --output_dir changes/stable_diffusion/ --info_file_out ${{ env.INFO_FILE_OUT }}
- name: "Provide information about who made the PR and other metadata"
uses: tsickert/discord-webhook@v6.0.0
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
content: "PR by ${{ github.actor }}: ${{ github.event.pull_request.title }} - ${{ github.event.pull_request.html_url }}"
- name: "Inform with Discord Webhook"
uses: tsickert/discord-webhook@v6.0.0
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
filename: ${{ env.INFO_FILE_OUT }}