mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-04-24 11:22:49 +00:00
fixed erros in the build.yml file
This commit is contained in:
parent
1150fe7155
commit
dacdb3b4e3
1 changed files with 10 additions and 5 deletions
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
|
@ -8,6 +8,11 @@ on:
|
|||
jobs:
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
env:
|
||||
IMAGE_NAME: petclinic
|
||||
IMAGE_TAG: ${{ github.sha }}
|
||||
ARTIFACTORY_URL: petclinicmac.jfrog.io
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
@ -35,11 +40,11 @@ jobs:
|
|||
- name: Build Docker Image
|
||||
run: |
|
||||
# Build Docker image
|
||||
docker build -t $IMAGE_NAME:$IMAGE_TAG .
|
||||
docker build -t "${IMAGE_NAME}:${IMAGE_TAG}" .
|
||||
|
||||
# Tag for Artifactory
|
||||
docker tag $IMAGE_NAME:$IMAGE_TAG $ARTIFACTORY_URL/petclinic-docker/$IMAGE_NAME:$IMAGE_TAG
|
||||
docker tag $IMAGE_NAME:$IMAGE_TAG $ARTIFACTORY_URL/petclinic-docker/$IMAGE_NAME:latest
|
||||
docker tag "${IMAGE_NAME}:${IMAGE_TAG}" "${ARTIFACTORY_URL}/petclinic-docker/${IMAGE_NAME}:${IMAGE_TAG}"
|
||||
docker tag "${IMAGE_NAME}:${IMAGE_TAG}" "${ARTIFACTORY_URL}/petclinic-docker/${IMAGE_NAME}:latest"
|
||||
|
||||
- name: Login to Artifactory
|
||||
run: |
|
||||
|
@ -47,8 +52,8 @@ jobs:
|
|||
|
||||
- name: Push Image to Artifactory
|
||||
run: |
|
||||
docker push $ARTIFACTORY_URL/petclinic-docker/$IMAGE_NAME:$IMAGE_TAG
|
||||
docker push $ARTIFACTORY_URL/petclinic-docker/$IMAGE_NAME:latest
|
||||
docker push "${ARTIFACTORY_URL}/petclinic-docker/${IMAGE_NAME}:${IMAGE_TAG}"
|
||||
docker push "${ARTIFACTORY_URL}/petclinic-docker/${IMAGE_NAME}:latest"
|
||||
|
||||
# - name: Build Docker Image
|
||||
# run: |
|
||||
|
|
Loading…
Reference in a new issue