Try using latest version to bump docker image tag
This commit is contained in:
parent
e848cedbaf
commit
5feb29422c
@ -70,21 +70,7 @@ jobs:
|
|||||||
# attempting to run it from a `pr`, which is not the case
|
# attempting to run it from a `pr`, which is not the case
|
||||||
- run:
|
- run:
|
||||||
name: Publish using Semantic Release
|
name: Publish using Semantic Release
|
||||||
command: npx semantic-release --debug --dry-run
|
command: npx semantic-release --debug
|
||||||
|
|
||||||
docker_publish:
|
|
||||||
<<: *defaults
|
|
||||||
steps:
|
|
||||||
- attach_workspace:
|
|
||||||
at: ~/repo
|
|
||||||
- setup_remote_docker:
|
|
||||||
docker_layer_caching: true
|
|
||||||
- run:
|
|
||||||
name: Build and push Docker image
|
|
||||||
command: |
|
|
||||||
docker build -t ohif/$IMAGE_NAME:$TAG .
|
|
||||||
echo $DOCKER_PWD | docker login -u $DOCKER_LOGIN --password-stdin
|
|
||||||
docker push ohif/$IMAGE_NAME:$TAG
|
|
||||||
|
|
||||||
docs_publish:
|
docs_publish:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
@ -106,6 +92,23 @@ jobs:
|
|||||||
name: Publish Docs
|
name: Publish Docs
|
||||||
command: yarn run docs:publish
|
command: yarn run docs:publish
|
||||||
|
|
||||||
|
docker_publish:
|
||||||
|
<<: *defaults
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: ~/repo
|
||||||
|
- run:
|
||||||
|
name: Skip if no new version
|
||||||
|
command: [ ! -e /tmp/updated-version ] || exit 1
|
||||||
|
- setup_remote_docker:
|
||||||
|
docker_layer_caching: true
|
||||||
|
- run:
|
||||||
|
name: Build and push Docker image
|
||||||
|
command: |
|
||||||
|
docker build -t ohif/$IMAGE_NAME:{{ checksum "/tmp/updated-version" }}.${CIRCLE_BUILD_NUM} .
|
||||||
|
echo $DOCKER_PWD | docker login -u $DOCKER_LOGIN --password-stdin
|
||||||
|
docker push ohif/$IMAGE_NAME:{{ checksum "/tmp/updated-version" }}.${CIRCLE_BUILD_NUM}
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
@ -136,3 +139,4 @@ workflows:
|
|||||||
- docker_publish:
|
- docker_publish:
|
||||||
requires:
|
requires:
|
||||||
- build_and_test
|
- build_and_test
|
||||||
|
- npm_publish
|
||||||
|
|||||||
14
.releaserc
Normal file
14
.releaserc
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
"@semantic-release/npm",
|
||||||
|
"@semantic-release/github",
|
||||||
|
[
|
||||||
|
"@semantic-release/exec",
|
||||||
|
{
|
||||||
|
"publishCmd": "echo ${nextRelease.version} > /tmp/updated-version"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user