Skip to content

build(deps-dev): bump braces from 3.0.2 to 3.0.3 #118

build(deps-dev): bump braces from 3.0.2 to 3.0.3

build(deps-dev): bump braces from 3.0.2 to 3.0.3 #118

Workflow file for this run

name: build
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name:
uses: actions/setup-node@v1
- run: npm ci
- run: npm run prettier:check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: docker build -t local/carbonara .
- run: docker run -v $(pwd)/test/images:/home/pptruser/app/test/images --rm local/carbonara npm test
- uses: actions/upload-artifact@v2
if: failure()
with:
name: screenshots
path: test/images/
push:
needs: [lint, test]
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- name: Log into dockerhub registry
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u petersolopov --password-stdin
- name: Push images
run: |
docker build --file Dockerfile --build-arg npm-ci-params="--only=production" -t petersolopov/carbonara .
docker push petersolopov/carbonara:latest
deploy:
needs: [lint, test]
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: deploy
run: |
curl -s ${{ secrets.DEPLOY_HOOK }} \
> /dev/null
notify:
needs: [lint, test, push, deploy]
runs-on: ubuntu-latest
if: github.event_name == 'push' && failure()
steps:
- name: notify
run: |
curl -s https://api.telegram.org/bot$TELEGRAM_TOKEN/sendMessage \
-d parse_mode=markdown \
-d chat_id=$CHAT_ID \
-d text="🚫 [$GITHUB_REPOSITORY](https://github.com/$GITHUB_REPOSITORY/actions/runs/$RUN_ID) build action was failed" \
> /dev/null
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
CHAT_ID: ${{ secrets.CHAT_ID}}
RUN_ID: ${{ github.run_id }}