Compare commits

..

4 Commits

Author SHA1 Message Date
f8a6f4d245 Merge pull request 'Push to the remote registry only on the main branch' (#165) from push-only-main into main
All checks were successful
Playwright Tests / test (push) Has been skipped
Check usage of free licenses / build-static-assets (push) Successful in 35s
Build Nginx-based docker image / build-static-assets (push) Successful in 4m29s
Reviewed-on: #165
2024-12-29 12:22:27 +00:00
5dabecc9ed Update job name to be consistent with other jobs
All checks were successful
Playwright Tests / test (pull_request) Has been skipped
Check usage of free licenses / build-static-assets (pull_request) Successful in 49s
Add copyright notice / copyright_notice (pull_request) Successful in 1m6s
Build Nginx-based docker image / build-static-assets (push) Successful in 3m13s
2024-12-29 13:16:46 +01:00
b3dc01bbb5 Build nginx image on all branches
Some checks failed
Playwright Tests / test (pull_request) Has been skipped
Check usage of free licenses / build-static-assets (pull_request) Successful in 43s
Add copyright notice / copyright_notice (pull_request) Successful in 50s
Build Nginx-based docker image / build-static-assets (push) Has been cancelled
2024-12-29 13:14:32 +01:00
2ded8676f4 Push to the remote registry only on the main branch 2024-12-29 13:13:44 +01:00

View File

@ -1,8 +1,6 @@
name: Build Nginx-based docker image
on:
push:
branches:
- main
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
@ -30,7 +28,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,16 +38,16 @@ 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
- name: Build and push
- name: Build and push (final)
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