From 51433300c39395e815df01f1a34c2aa97055a64e Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Wed, 16 Oct 2019 11:37:19 +0200 Subject: [PATCH] style: add action to prettify Markdown files --- .github/workflows/prettify.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/prettify.yaml diff --git a/.github/workflows/prettify.yaml b/.github/workflows/prettify.yaml new file mode 100644 index 0000000..cac6594 --- /dev/null +++ b/.github/workflows/prettify.yaml @@ -0,0 +1,27 @@ +name: Prettify + +on: push + +jobs: + tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: "12.x" + - name: Prettify + run: npx prettier --write *.md + - name: Commit + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "machine github.com login tech-woman password ${GITHUB_TOKEN}" > ~/.netrc + git status + git config user.email "actions@example.com" + git config user.name "GitHub Actions" + git add *.md + git commit -m "style: prettify" + git push origin HEAD:`echo $GITHUB_REF | cut -d '/' -f 3`