mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Replace master workflow with ci workflow, build and docker for v tags
This commit is contained in:
@@ -1,25 +1,33 @@
|
||||
name: Build
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
# pull_request:
|
||||
# branches: [ master ]
|
||||
branches:
|
||||
- 'master'
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
jobs:
|
||||
|
||||
build_and_test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
-
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14.x
|
||||
- run: yarn install
|
||||
- run: yarn test
|
||||
node-version: 16.x
|
||||
-
|
||||
run: yarn install
|
||||
-
|
||||
run: yarn test
|
||||
|
||||
|
||||
push_to_registry:
|
||||
needs: build_and_test
|
||||
name: Push Docker image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -46,5 +54,4 @@ jobs:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: latest
|
||||
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
16
.github/workflows/pr.yml
vendored
16
.github/workflows/pr.yml
vendored
@@ -1,16 +0,0 @@
|
||||
name: Test PR
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
|
||||
build_and_test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14.x
|
||||
- run: yarn install
|
||||
- run: yarn test
|
||||
- run: docker build
|
||||
Reference in New Issue
Block a user