@@ -106,7 +106,7 @@ jobs:
106106 run : yarn test
107107
108108 - name : " Authenticate with GCP"
109- if : github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened' || github.event.action == 'labeled' || github.event.action == 'unlabeled')
109+ if : github.ref == 'refs/heads/main' || (github. event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened' || github.event.action == 'labeled' || github.event.action == 'unlabeled') )
110110 id : gcp-auth
111111 uses : google-github-actions/auth@v2
112112 with :
@@ -115,23 +115,23 @@ jobs:
115115 service_account :
[email protected] 116116
117117 - name : " Login to GCP Artifact Registry"
118- if : github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened' || github.event.action == 'labeled' || github.event.action == 'unlabeled')
118+ if : github.ref == 'refs/heads/main' || (github. event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened' || github.event.action == 'labeled' || github.event.action == 'unlabeled') )
119119 uses : docker/login-action@v3
120120 with :
121121 registry : europe-docker.pkg.dev
122122 username : oauth2accesstoken
123123 password : ${{ steps.gcp-auth.outputs.access_token }}
124124
125125 - name : " Push ActivityPub Docker Image"
126- if : github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened' || github.event.action == 'labeled' || github.event.action == 'unlabeled')
126+ if : github.ref == 'refs/heads/main' || (github. event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened' || github.event.action == 'labeled' || github.event.action == 'unlabeled') )
127127 uses : docker/build-push-action@v6
128128 with :
129129 context : .
130130 push : true
131131 tags : ${{ steps.activitypub-docker-metadata.outputs.tags }}
132132
133133 - name : " Push Migrations Docker Image"
134- if : github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened' || github.event.action == 'labeled' || github.event.action == 'unlabeled')
134+ if : github.ref == 'refs/heads/main' || (github. event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened' || github.event.action == 'labeled' || github.event.action == 'unlabeled') )
135135 uses : docker/build-push-action@v6
136136 with :
137137 context : migrate
0 commit comments