添加5份资料 #46
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 format | |
on: | |
pull_request_target: | |
types: [opened, synchronize, reopened] | |
branches: | |
- master | |
jobs: | |
check-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Show log | |
run: git log -5 | |
- id: pdfium | |
name: Get pdfium-binaries latest | |
uses: pozetroninc/github-action-get-latest-release@master | |
with: | |
owner: bblanchon | |
repo: pdfium-binaries | |
- id: check | |
name: Get byrdocs-check release | |
uses: pozetroninc/github-action-get-latest-release@master | |
with: | |
owner: byrdocs | |
repo: byrdocs-check | |
- name: Download release | |
run: | | |
wget https://github.com/bblanchon/pdfium-binaries/releases/download/${{ steps.pdfium.outputs.release }}/pdfium-linux-x64.tgz | |
tar --overwrite -zxvf pdfium-linux-x64.tgz | |
wget https://github.com/byrdocs/byrdocs-check/releases/download/${{ steps.check.outputs.release }}/check-cmt -O check-cmt | |
wget https://github.com/byrdocs/byrdocs-check/releases/download/${{ steps.check.outputs.release }}/check-pr -O check-pr | |
chmod 777 check-cmt | |
chmod 777 check-pr | |
- name: Check | |
run: ./check-pr -d ./metadata -u ${{ secrets.S3_URL }} -a ${{ secrets.S3_ACCESS_KEY }} -s ${{ secrets.S3_SECRET_ACCESS_KEY }} -b ${{ secrets.BACKEND_URL }} -t ${{ secrets.BACKEND_TOKEN }} -c ${{ vars.S3_BUCKET }} > comment.txt | |
- name: Debug | |
run: cat ./comment.txt | |
- name: Create or Update Comment on pr | |
if: github.event_name == 'pull_request_target' | |
uses: peter-evans/[email protected] | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-path: ./comment.txt | |