solution: publish to docker on github release
This commit is contained in:
23
.github/workflows/publish.yaml
vendored
Normal file
23
.github/workflows/publish.yaml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Publish
|
||||
on: [release]
|
||||
jobs:
|
||||
publish-docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Check
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: check
|
||||
- name: Upload to Docker
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: jib -Platest=true
|
||||
env:
|
||||
DOCKER_KEY: ${{ secrets.DOCKER_KEY }}
|
||||
@@ -1,9 +1,24 @@
|
||||
name: Integration Test
|
||||
name: Tests
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
container-job:
|
||||
unit-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
|
||||
- name: Check
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: check
|
||||
|
||||
integration-test:
|
||||
runs-on: ubuntu-latest
|
||||
# Docker Hub image that `container-job` executes in
|
||||
container: node:10.18-jessie
|
||||
@@ -15,7 +30,6 @@ jobs:
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
20
.github/workflows/unit-test.yaml
vendored
20
.github/workflows/unit-test.yaml
vendored
@@ -1,20 +0,0 @@
|
||||
name: Unit Test
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
|
||||
- name: Check
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: check
|
||||
@@ -4,7 +4,7 @@ ifdef::env-github[]
|
||||
:imagesdir: https://raw.githubusercontent.com/emeraldpay/dshackle/master/docs/assets
|
||||
endif::[]
|
||||
|
||||
image:https://github.com/emeraldpay/dshackle/workflows/Unit%20Test/badge.svg["Unit Test"]
|
||||
image:https://github.com/emeraldpay/dshackle/workflows/Tests/badge.svg["Unit Tests"]
|
||||
image:https://img.shields.io/docker/pulls/emeraldpay/dshackle?style=flat-square["Docker",link="https://hub.docker.com/r/emeraldpay/dshackle"]
|
||||
image:https://img.shields.io/github/license/emeraldpay/dshackle.svg?style=flat-square&maxAge=2592000["License", link="https://github.com/emeraldpay/dshackle/blob/master/LICENSE"]
|
||||
image:https://badges.gitter.im/emeraldpay/community.svg[link="https://gitter.im/emeraldpay/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge]
|
||||
|
||||
@@ -140,6 +140,10 @@ jib {
|
||||
}
|
||||
add project.version.toString().replaceAll('(\\d+\\.\\d+).+', '$1')
|
||||
}
|
||||
auth {
|
||||
username = 'splix'
|
||||
password = System.getenv('DOCKER_KEY')
|
||||
}
|
||||
}
|
||||
container {
|
||||
jvmFlags = [
|
||||
|
||||
Reference in New Issue
Block a user