Commit 088a2c4 1 parent b90e058 commit 088a2c4 Copy full SHA for 088a2c4
File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 50
50
51
51
# Login against a Docker registry except on PR
52
52
- name : Log into registry ${{ env.REGISTRY }}
53
- if : github.event_name != 'pull_request'
54
53
uses : docker/login-action@v3
55
54
with :
56
55
registry : ${{ env.REGISTRY }}
69
68
${{ matrix.postgres_version }}-${{ matrix.major }}
70
69
71
70
# 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
74
73
uses : docker/build-push-action@v5
75
74
with :
76
75
context : .
@@ -90,16 +89,16 @@ jobs:
90
89
env :
91
90
POSTGRES_PASSWORD : examplepassword
92
91
run : |
93
- DIGEST=${{ steps.build-and-push.outputs.digest }}
92
+ DIGEST=${{ steps.build-and-push-digest .outputs.digest }}
94
93
docker run -d --name test-db -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@$DIGEST
95
94
sleep 30
96
95
docker exec test-db pg_isready -U postgres
97
96
docker stop test-db
98
97
docker rm test-db
99
98
100
99
# 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
103
102
if : github.event_name != 'pull_request'
104
103
uses : docker/build-push-action@v5
105
104
with :
You can’t perform that action at this time.
0 commit comments