Push to the remote registry only on the main branch
This commit is contained in:
parent
1269a1a56f
commit
2ded8676f4
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@ -30,7 +30,7 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
target: deps
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
push: ${{ github.ref == 'refs/heads/main' }}
|
||||
tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:deps
|
||||
cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:deps
|
||||
cache-to: type=inline
|
||||
@ -40,7 +40,7 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
target: builder
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
push: ${{ github.ref == 'refs/heads/main' }}
|
||||
tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:builder
|
||||
cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:builder
|
||||
cache-to: type=inline
|
||||
@ -49,7 +49,7 @@ jobs:
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
push: ${{ github.ref == 'refs/heads/main' }}
|
||||
tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:latest
|
||||
cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:latest
|
||||
cache-to: type=inline
|
Loading…
x
Reference in New Issue
Block a user