2222
2323jobs :
2424 timestamp :
25- if : (github.event_name != 'schedule' || github.event.repo.name == 'discourse/discourse_docker')
25+ if : (github.event_name != 'schedule' || github.repository == 'discourse/discourse_docker')
2626 runs-on : ubuntu-latest
2727 outputs :
2828 timestamp : ${{ steps.timestamp.outputs.timestamp }}
3434 echo "timestamp=$timestamp" >> $GITHUB_OUTPUT
3535
3636 base :
37- if : (github.event_name != 'schedule' || github.event.repo.name == 'discourse/discourse_docker')
37+ if : (github.event_name != 'schedule' || github.repository == 'discourse/discourse_docker')
3838 # `unbuntu-22.04-8core` for arch amd64 non-scheduled builds
3939 # `unbuntu-22.04` for arch amd64 scheduled builds
4040 # `unbuntu-22.04-8core-arm` for arch arm64 non-scheduled builds
@@ -123,7 +123,7 @@ jobs:
123123 echo "current slim: ${CURRENT_SLIM} release: ${CURRENT_RELEASE}. new slim: ${NEW_SLIM} release: ${NEW_RELEASE}"
124124
125125 - name : push to dockerhub
126- if : github.ref == 'refs/heads/main' && github.event.repo.name == 'discourse/discourse_docker'
126+ if : github.ref == 'refs/heads/main' && github.repository == 'discourse/discourse_docker'
127127 env :
128128 DOCKERHUB_PASSWORD : ${{ secrets.DOCKERHUB_PASSWORD }}
129129 run : |
@@ -134,7 +134,7 @@ jobs:
134134 docker push discourse/discourse_dev:${{ env.TIMESTAMP }}-${{ matrix.arch }}
135135
136136 - name : Push discourse/base:aarch64 image for backwards compatibility
137- if : (github.ref == 'refs/heads/main') && (matrix.arch == 'arm64') && (github.event.repo.name == 'discourse/discourse_docker')
137+ if : (github.ref == 'refs/heads/main') && (matrix.arch == 'arm64') && (github.repository == 'discourse/discourse_docker')
138138 run : |
139139 docker tag discourse/base:2.0.${{ env.TIMESTAMP }}-main-${{ matrix.arch }} discourse/base:aarch64
140140 docker push discourse/base:aarch64
@@ -144,7 +144,7 @@ jobs:
144144 needs : [base, timestamp]
145145 env :
146146 TIMESTAMP : ${{ needs.timestamp.outputs.timestamp }}
147- if : github.ref == 'refs/heads/main' && github.event.repo.name == 'discourse/discourse_docker'
147+ if : github.ref == 'refs/heads/main' && github.repository == 'discourse/discourse_docker'
148148 steps :
149149 - name : create and push multiarch manifests
150150 run : |
@@ -231,7 +231,7 @@ jobs:
231231 run : |
232232 docker images discourse/discourse_test
233233 - name : push to dockerhub
234- if : success() && (github.ref == 'refs/heads/main') && (github.event.repo.name == 'discourse/discourse_docker')
234+ if : success() && (github.ref == 'refs/heads/main') && (github.repository == 'discourse/discourse_docker')
235235 env :
236236 DOCKERHUB_PASSWORD : ${{ secrets.DOCKERHUB_PASSWORD }}
237237 run : |
0 commit comments