Debug smaller section
Some checks failed
CI/CD Pipeline - Build, Test, and Deploy / 🏗️ Build & Push Image (push) Failing after 6s
CI/CD Pipeline - Build, Test, and Deploy / 🧹 Cleanup (push) Successful in 1s

This commit is contained in:
2025-07-03 08:48:10 -06:00
parent 95e6532ada
commit 2b3ace86e2

View File

@ -77,48 +77,48 @@ jobs:
build: build:
name: 🏗️ Build & Push Image name: 🏗️ Build & Push Image
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [test, security] # needs: [test, security]
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
outputs: # outputs:
image-tag: ${{ steps.meta.outputs.tags }} # image-tag: ${{ steps.meta.outputs.tags }}
image-digest: ${{ steps.build.outputs.digest }} # image-digest: ${{ steps.build.outputs.digest }}
steps: steps:
- name: Checkout code # - name: Checkout code
uses: actions/checkout@v4 # uses: actions/checkout@v4
- name: Set up Docker Buildx # - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 # uses: docker/setup-buildx-action@v3
- name: Login to Harbor Registry # - name: Login to Harbor Registry
uses: docker/login-action@v3 # uses: docker/login-action@v3
with: # with:
registry: ${{ env.REGISTRY }} # registry: ${{ env.REGISTRY }}
username: ${{ secrets.HARBOR_USERNAME }} # username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_TOKEN }} # password: ${{ secrets.HARBOR_TOKEN }}
- name: Extract metadata # - name: Extract metadata
id: meta # id: meta
uses: docker/metadata-action@v5 # uses: docker/metadata-action@v5
with: # with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: | # tags: |
type=ref,event=branch # type=ref,event=branch
type=ref,event=pr # type=ref,event=pr
type=sha,prefix={{branch}}- # type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}} # type=raw,value=latest,enable={{is_default_branch}}
type=raw,value={{date 'YYYYMMDD-HHmmss'}} # type=raw,value={{date 'YYYYMMDD-HHmmss'}}
- name: Build and push Docker image # - name: Build and push Docker image
id: build # id: build
uses: docker/build-push-action@v5 # uses: docker/build-push-action@v5
with: # with:
context: . # context: .
platforms: linux/amd64,linux/arm64 # platforms: linux/amd64,linux/arm64
push: true # push: true
tags: ${{ steps.meta.outputs.tags }} # tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} # labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache # cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max # cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
- name: Generate SBOM - name: Generate SBOM
run: | run: |