cleaning up repository, changed workflows.

This commit is contained in:
2021-04-18 09:49:04 +02:00
parent c86e20cfcd
commit 627c1908c2
5 changed files with 14 additions and 8 deletions

View File

@ -6,19 +6,23 @@ name: Node.js CI
on:
push:
branches: [ master ]
paths:
- '**.jsx?'
- '**.json'
- 'Dockerfile'
pull_request:
branches: [ master ]
paths:
- '**.jsx?'
- '**.json'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
@ -28,13 +32,16 @@ jobs:
- run: npm ci
- run: npm run build --if-present
- run: npm test
deploy:
needs: build
if: ${{github.event_name == 'push'}}
runs-on: ubuntu-latest
steps:
- name: Deploy
- name: Deploy to Dockerhub
run: |
curl -X POST https://api.github.com/repos/TobenderZephyr/dsabot-docker/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.ACCESS_TOKEN }} \
--data '{"event_type": "ping", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}'
--data '{"event_type": "Push from '"${{github.ref}}"'", "ref": "'"${{github.ref}}"'", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}'