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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches:
|
||||||
# pull_request:
|
- 'master'
|
||||||
# branches: [ master ]
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build_and_test:
|
build_and_test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
-
|
||||||
- uses: actions/setup-node@v1
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 14.x
|
node-version: 16.x
|
||||||
- run: yarn install
|
-
|
||||||
- run: yarn test
|
run: yarn install
|
||||||
|
-
|
||||||
|
run: yarn test
|
||||||
|
|
||||||
|
|
||||||
push_to_registry:
|
push_to_registry:
|
||||||
needs: build_and_test
|
|
||||||
name: Push Docker image to Docker Hub
|
name: Push Docker image to Docker Hub
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -46,5 +54,4 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
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