Manuel Bustillo 5dc5f96a61
All checks were successful
Check usage of free licenses / build-static-assets (pull_request) Successful in 2m19s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 28m45s
Playwright Tests / test (pull_request) Successful in 3m44s
Automatically cancel redundant builds
2024-10-27 19:44:23 +01:00

36 lines
1.0 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
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
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
cache-to: type=inline