mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
build checker
This commit is contained in:
parent
03160d1ddb
commit
42dbe222ca
34
.github/workflows/lctt-article-checker.yml
vendored
34
.github/workflows/lctt-article-checker.yml
vendored
@ -1,14 +1,8 @@
|
|||||||
name: LCTT Article Checker
|
name: LCTT Article Checker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
# pull_request:
|
|
||||||
# branches: [ master ]
|
|
||||||
schedule:
|
|
||||||
- cron: "0 * * * *"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -18,10 +12,6 @@ jobs:
|
|||||||
TRAVIS_PULL_REQUEST: ${{ github.event.number }}
|
TRAVIS_PULL_REQUEST: ${{ github.event.number }}
|
||||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||||
steps:
|
steps:
|
||||||
- name: Dump GitHub context
|
|
||||||
env:
|
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
||||||
run: echo "$GITHUB_CONTEXT"
|
|
||||||
- name: Set ENV variables
|
- name: Set ENV variables
|
||||||
run: |
|
run: |
|
||||||
echo "::set-env name=TRAVIS_BRANCH::${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')}"
|
echo "::set-env name=TRAVIS_BRANCH::${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')}"
|
||||||
@ -29,25 +19,9 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/checkout@v2
|
- name: "checkout master branch & return to pull request branch"
|
||||||
with:
|
run: CURRENT=$(echo ${{github.ref}} | sed "s|refs/|refs/remotes/|") && git checkout master && git checkout $CURRENT
|
||||||
fetch-depth: 0
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
ref: gh-pages
|
|
||||||
path: build
|
|
||||||
- name: Install JQ
|
|
||||||
run: sudo apt install jq -y
|
|
||||||
- name: run check
|
- name: run check
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
run: sh ./scripts/check.sh;
|
run: sh ./scripts/check.sh;
|
||||||
- name: run badge
|
|
||||||
if: ${{ github.event_name != 'pull_request' }}
|
|
||||||
run: sh ./scripts/badge.sh;
|
|
||||||
- name: run status
|
|
||||||
if: ${{ github.event_name == 'schedule' }}
|
|
||||||
run: sh ./scripts/status.sh;
|
|
||||||
- uses: crazy-max/ghaction-github-pages@v2.2.0
|
|
||||||
with:
|
|
||||||
keep_history: true
|
|
||||||
build_dir: ${{github.repository}}/build
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user