Manuel Bustillo
a8f0302bb9
All checks were successful
Add copyright notice / copyright_notice (pull_request) Successful in 1m2s
Check usage of free licenses / check-licenses (pull_request) Successful in 1m10s
Run unit tests / unit_tests (pull_request) Successful in 1m52s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 11m15s
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
name: Build Nginx-based docker image
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
concurrency:
|
|
group: ${{ github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
build-static-assets:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to the private Docker registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ secrets.PRIVATE_REGISTRY_HOST }}
|
|
username: ${{ secrets.PRIVATE_REGISTRY_USERNAME }}
|
|
password: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
|
|
|
|
- name: Build and push intermediate stages (build)
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
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 |