File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 5050
5151 # Login against a Docker registry except on PR
5252 - name : Log into registry ${{ env.REGISTRY }}
53- if : github.event_name != 'pull_request'
5453 uses : docker/login-action@v3
5554 with :
5655 registry : ${{ env.REGISTRY }}
6968 ${{ matrix.postgres_version }}-${{ matrix.major }}
7069
7170 # Build and push Docker image with Buildx, using only the digest
72- - name : Build and push Docker image
73- id : build-and-push
71+ - name : Build and push Docker image with digest
72+ id : build-and-push-digest
7473 uses : docker/build-push-action@v5
7574 with :
7675 context : .
@@ -90,16 +89,16 @@ jobs:
9089 env :
9190 POSTGRES_PASSWORD : examplepassword
9291 run : |
93- DIGEST=${{ steps.build-and-push.outputs.digest }}
92+ DIGEST=${{ steps.build-and-push-digest .outputs.digest }}
9493 docker run -d --name test-db -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@$DIGEST
9594 sleep 30
9695 docker exec test-db pg_isready -U postgres
9796 docker stop test-db
9897 docker rm test-db
9998
10099 # Build and push Docker image with Buildx,this time using the final tags
101- - name : Build and push Docker image
102- id : build-and-push
100+ - name : Build and push Docker image with final tags (release)
101+ id : build-and-push-release
103102 if : github.event_name != 'pull_request'
104103 uses : docker/build-push-action@v5
105104 with :
You can’t perform that action at this time.
0 commit comments