Compare commits

..

No commits in common. "1e533702fd2e8401bd76ab079416180692210aff" and "d2841a449e939d2c1d4f184efe7ed136e30ca58b" have entirely different histories.

View File

@ -1,6 +1,8 @@
name: Build Nginx-based docker image name: Build Nginx-based docker image
on: on:
push: push:
branches:
- main
concurrency: concurrency:
group: ${{ github.ref }} group: ${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
@ -22,22 +24,13 @@ jobs:
registry: ${{ secrets.PRIVATE_REGISTRY_HOST }} registry: ${{ secrets.PRIVATE_REGISTRY_HOST }}
username: ${{ secrets.PRIVATE_REGISTRY_USERNAME }} username: ${{ secrets.PRIVATE_REGISTRY_USERNAME }}
password: ${{ secrets.PRIVATE_REGISTRY_TOKEN }} password: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
- name: Build and push intermediate stages (build) - name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: . context: .
target: build push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.ref == 'refs/heads/main' }} tags: |
tags: ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:build ${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:latest
cache-from: type=registry,ref=${{ secrets.PRIVATE_REGISTRY_HOST }}/${{ env.GITHUB_REPOSITORY }}:build cache-from: type=registry,ref=user/app:latest
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 cache-to: type=inline