@@ -34,14 +34,12 @@ jobs:
34
34
35
35
- name : Set up Docker Buildx
36
36
uses : docker/setup-buildx-action@v3
37
-
38
37
- name : Log in to Docker Hub
39
38
if : github.event_name != 'pull_request'
40
39
uses : docker/login-action@v3
41
40
with :
42
- username : ${{ secrets.DOCKERHUB_USERNAME }}
43
- password : ${{ secrets.DOCKERHUB_TOKEN }}
44
-
41
+ username : ${{ secrets.FLYIOBUILDS_DOCKERHUB_USERNAME }}
42
+ password : ${{ secrets.FLYIOBUILDS_DOCKERHUB_TOKEN }}
45
43
- name : Extract metadata (tags, labels) for Docker
46
44
id : meta
47
45
uses : docker/metadata-action@v5
64
62
context : .
65
63
file : ./build/postgres-operator/Dockerfile
66
64
push : ${{ github.event_name != 'pull_request' }}
67
- platforms : linux/amd64,linux/arm64
65
+ load : ${{ github.event_name == 'pull_request' }}
66
+ platforms : ${{ github.event_name != 'pull_request' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
68
67
tags : ${{ steps.meta.outputs.tags }}
69
68
labels : ${{ steps.meta.outputs.labels }}
70
69
cache-from : type=gha
71
- cache-to : type=gha,mode=max
70
+ cache-to : type=gha,mode=max
71
+
72
+ # For pull requests, we want to test the image
73
+ - name : Test image
74
+ if : github.event_name == 'pull_request'
75
+ run : |
76
+ docker image inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:pr-${{ github.event.pull_request.number }}
77
+ # Add any additional test commands here
0 commit comments