Skip to content

Commit

Permalink
(actions) auto update build (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh authored Jun 20, 2021
1 parent 735a4fe commit 9a9ea04
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ on:
jobs:
ci:
name: ${{ matrix.node_version }}
if: ${{ github.actor != 'RWT-bot' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node_version: [14, 16]
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.RWT_BOT_PAT }}
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
Expand All @@ -27,14 +30,8 @@ jobs:
run: npm run build
- name: Test
run: npm test
- name: Build Check
run: |
echo -e "\e[1m\e[35mChecking build folder is up-to-date with library\e[0m"
changed_build_files=$(git -C "$(git rev-parse --show-toplevel)" diff --name-only HEAD -- build)
if [ -n "$changed_build_files" ]
then
echo -e "\e[1m\e[31mBuild folder is out-of-sync with library. Build library, npm run build, and (ammend) commit\e[0m"
exit 1
else
echo -e "\e[1m\e[32mBuild folder is up-to-date with library\e[0m"
fi
- uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ github.event_name == 'push' && github.ref == 'develop' && matrix.node_version == 16 }}
with:
commit_message: Update Build
file_pattern: 'build/*.js'

0 comments on commit 9a9ea04

Please sign in to comment.