File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1818 runs-on : ubuntu-latest
1919 if : github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || github.event_name == 'pull_request'
2020
21+ env :
22+ PUSH_IMAGE : ${{ github.repository == 'EOPF-Explorer/data-pipeline' && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }}
23+ IMAGE_REGISTRY : ${{ secrets.OVH_HARBOR_REGISTRY || format('ghcr.io/{0}', github.repository_owner) }}
24+
2125 steps :
2226 - name : Checkout code
2327 uses : actions/checkout@v5
2630 id : meta
2731 uses : docker/metadata-action@v5
2832 with :
29- images : ${{ secrets.OVH_HARBOR_REGISTRY }}/eopf-sentinel-zarr-explorer/data-pipeline
33+ images : ${{ env.IMAGE_REGISTRY }}/eopf-sentinel-zarr-explorer/data-pipeline
3034 tags : |
3135 type=sha
3236 type=ref,event=branch
3842 uses : docker/setup-buildx-action@v3
3943
4044 - name : Log in to OVH Container Registry
45+ if : env.PUSH_IMAGE == 'true'
4146 uses : docker/login-action@v3
4247 with :
4348 registry : ${{ secrets.OVH_HARBOR_REGISTRY }}
5055 context : .
5156 file : docker/Dockerfile
5257 platforms : linux/amd64
53- push : true
58+ push : ${{ env.PUSH_IMAGE == ' true' }}
5459 tags : ${{ steps.meta.outputs.tags }}
5560 labels : ${{ steps.meta.outputs.labels }}
5661 cache-from : type=gha
You can’t perform that action at this time.
0 commit comments