Configure build and cache for intermediate layers
All checks were successful
Add copyright notice / copyright_notice (pull_request) Successful in 1m5s
Check usage of free licenses / check-licenses (pull_request) Successful in 2m12s
Run unit tests / unit_tests (pull_request) Successful in 4m59s
Build Nginx-based docker image / build-static-assets (push) Successful in 17m31s
All checks were successful
Add copyright notice / copyright_notice (pull_request) Successful in 1m5s
Check usage of free licenses / check-licenses (pull_request) Successful in 2m12s
Run unit tests / unit_tests (pull_request) Successful in 4m59s
Build Nginx-based docker image / build-static-assets (push) Successful in 17m31s
This commit is contained in:
parent
d2841a449e
commit
9c3c766175
@ -1,8 +1,6 @@
|
||||
name: Build Nginx-based docker image
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
concurrency:
|
||||
group: ${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
@ -25,12 +23,21 @@ jobs:
|
||||
username: ${{ secrets.PRIVATE_REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
- name: Build and push intermediate stages (build)
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: |
|
||||
${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:latest
|
||||
cache-from: type=registry,ref=user/app:latest
|
||||
target: build
|
||||
push: ${{ github.ref == 'refs/heads/main' }}
|
||||
tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:build
|
||||
cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:build
|
||||
cache-to: type=inline
|
||||
|
||||
- name: Build and push (final)
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
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