1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-04-23 11:22:10 +00:00

Update Github Action + send push to Compiler (#7)

* Update node.js.yml

* Update node.js.yml

* Update node.js.yml

* Update node.js.yml
This commit is contained in:
Florian Bouillon 2021-04-26 11:38:23 +02:00 committed by GitHub
parent d62dab4a1d
commit 5a4a1f4399
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,28 +1,35 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI name: Compile
on: on:
push: push:
branches: [ master ] branches:
- master
pull_request: pull_request:
branches: [ master ]
jobs: jobs:
build: test:
name: Compilation Test
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
node-version: [15.x]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} - name: Setup NodeJS
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: ${{ matrix.node-version }} node-version: 15.x
- run: yarn - run: yarn
- run: yarn compile - run: yarn compile
push:
name: Launch the compiler
needs: test
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
- name: CUrl to the compiler
run: |
curl -XPOST -H 'Accept: application/vnd.github.everest-preview+json' -H "Authorization: Bearer $PAC" -d '{"event_type": "webhook"}' 'https://api.github.com/repos/tcgdex/compiler/dispatches'
env:
PAC: ${{ secrets.PAC }}