name: Peek Icons on: pull_request: types: [labeled] jobs: peek: # four outcomes: successful check and upload, # unsuccessful check (fail due to user), # fail due to system, skipped name: Peek Icons if: github.event.label.name == 'bot:peek' runs-on: windows-2019 steps: - uses: actions/checkout@v2 - name: Setup Python v3.8 uses: actions/setup-python@v2 with: python-version: 3.8 - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r ./.github/scripts/requirements.txt - name: Save the PR number in an artifact shell: bash env: PR_NUM: ${{ github.event.number }} run: echo $PR_NUM > pr_num.txt - name: Upload the PR number uses: actions/upload-artifact@v2 with: name: pr_num path: ./pr_num.txt - name: Run icomoon_peek.py env: PR_TITLE: ${{ github.event.pull_request.title }} shell: cmd run: > python ./.github/scripts/icomoon_peek.py ./.github/scripts/build_assets/geckodriver-v0.27.0-win64/geckodriver.exe ./icomoon.json ./devicon.json ./icons ./ --headless --pr_title "%PR_TITLE%" - name: Upload screenshots for comments uses: actions/upload-artifact@v2 if: success() with: name: screenshots path: ./screenshots/*.png - name: Upload geckodriver.log for debugging purposes uses: actions/upload-artifact@v2 if: failure() with: name: geckodriver-log path: ./geckodriver.log