update ci file
experiment with yaml formatting devel branch now has docker tag devel and latest now refers to main
This commit is contained in:
parent
aaf2ddcd25
commit
bfee57e339
16
.github/workflows/ci.yaml
vendored
16
.github/workflows/ci.yaml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Continuous Integration
|
name: Continuous Integration
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -77,7 +78,9 @@ jobs:
|
|||||||
publish:
|
publish:
|
||||||
name: Publish Release Docker Image
|
name: Publish Release Docker Image
|
||||||
needs: [build]
|
needs: [build]
|
||||||
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v')
|
if: |
|
||||||
|
github.event_name != 'pull_request' && \
|
||||||
|
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
CODEGEN_DB_HOST: localhost
|
CODEGEN_DB_HOST: localhost
|
||||||
@ -117,7 +120,14 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_LOGIN_PASSWORD }}
|
password: ${{ secrets.DOCKER_LOGIN_PASSWORD }}
|
||||||
- name: Migrate
|
- name: Migrate
|
||||||
run: csbt flyway/flywayMigrate
|
run: csbt flyway/flywayMigrate
|
||||||
- name: Publish
|
- name: Publish Tag
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
run: |
|
||||||
|
csbt docker:publish
|
||||||
|
- name: Publish Latest
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
env:
|
||||||
|
DOCKER_PUBLISH_TAG: latest
|
||||||
run: |
|
run: |
|
||||||
csbt docker:publish
|
csbt docker:publish
|
||||||
|
|
||||||
@ -133,7 +143,7 @@ jobs:
|
|||||||
CODEGEN_DB_PASSWORD: postgres
|
CODEGEN_DB_PASSWORD: postgres
|
||||||
CODEGEN_DB_NAME: codegendb
|
CODEGEN_DB_NAME: codegendb
|
||||||
DOCKER_JAVA_IMAGE: azul/zulu-openjdk-alpine:11-jre-headless
|
DOCKER_JAVA_IMAGE: azul/zulu-openjdk-alpine:11-jre-headless
|
||||||
DOCKER_PUBLISH_TAG: latest
|
DOCKER_PUBLISH_TAG: devel
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:12-alpine
|
image: postgres:12-alpine
|
||||||
|
Loading…
Reference in New Issue
Block a user