mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 13:25:49 +00:00
Corrected Pipeline
This commit is contained in:
parent
f75ad7eb37
commit
9823bf34e4
1 changed files with 8 additions and 8 deletions
16
.github/workflows/ci-cd.yaml
vendored
16
.github/workflows/ci-cd.yaml
vendored
|
@ -66,13 +66,13 @@ jobs:
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
- name: Build & Push
|
- name: Build & Push
|
||||||
run: |
|
run: |
|
||||||
SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-7)
|
SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-7)
|
||||||
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/mr:${SHORT_SHA} .
|
docker build -t ${{ secrets.DOCKER_USERNAME }}/mr:${SHORT_SHA} .
|
||||||
docker push ${{ secrets.DOCKERHUB_USERNAME }}/mr:${SHORT_SHA}
|
docker push ${{ secrets.DOCKER_USERNAME }}/mr:${SHORT_SHA}
|
||||||
|
|
||||||
docker-main:
|
docker-main:
|
||||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||||
|
@ -85,10 +85,10 @@ jobs:
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
- name: Build & Push
|
- name: Build & Push
|
||||||
run: |
|
run: |
|
||||||
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/main:latest .
|
docker build -t ${{ secrets.DOCKER_USERNAME }}/main:latest .
|
||||||
docker push ${{ secrets.DOCKERHUB_USERNAME }}/main:latest
|
docker push ${{ secrets.DOCKER_USERNAME }}/main:latest
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue