Merge pull request 'fix: build' (#9) from feat/live-preview into main
Some checks failed
BCards Deployment Pipeline / Run Tests (push) Successful in 2s
BCards Deployment Pipeline / PR Validation (push) Has been skipped
BCards Deployment Pipeline / Build and Push Image (push) Successful in 16m36s
BCards Deployment Pipeline / Deploy to Production (ARM - OCI) (push) Failing after 2s
BCards Deployment Pipeline / Deploy to Staging (x86 - Local) (push) Has been skipped
BCards Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Deployment Pipeline / Deployment Summary (push) Successful in 0s
Some checks failed
BCards Deployment Pipeline / Run Tests (push) Successful in 2s
BCards Deployment Pipeline / PR Validation (push) Has been skipped
BCards Deployment Pipeline / Build and Push Image (push) Successful in 16m36s
BCards Deployment Pipeline / Deploy to Production (ARM - OCI) (push) Failing after 2s
BCards Deployment Pipeline / Deploy to Staging (x86 - Local) (push) Has been skipped
BCards Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Deployment Pipeline / Deployment Summary (push) Successful in 0s
Reviewed-on: http://git.carneiro.ddnsfree.com/ricardo/BCards/pulls/9
This commit is contained in:
commit
8554b68369
@ -113,7 +113,7 @@ jobs:
|
|||||||
echo "tag=latest" >> $GITHUB_OUTPUT
|
echo "tag=latest" >> $GITHUB_OUTPUT
|
||||||
echo "platform=linux/arm64" >> $GITHUB_OUTPUT
|
echo "platform=linux/arm64" >> $GITHUB_OUTPUT
|
||||||
echo "environment=Production" >> $GITHUB_OUTPUT
|
echo "environment=Production" >> $GITHUB_OUTPUT
|
||||||
echo "dockerfile=Dockerfile" >> $GITHUB_OUTPUT
|
echo "dockerfile=src/BCards.Web/Dockerfile" >> $GITHUB_OUTPUT
|
||||||
echo "deploy_target=production" >> $GITHUB_OUTPUT
|
echo "deploy_target=production" >> $GITHUB_OUTPUT
|
||||||
elif [[ "$BRANCH_NAME" == Release/* ]]; then
|
elif [[ "$BRANCH_NAME" == Release/* ]]; then
|
||||||
# Release = Staging (x86)
|
# Release = Staging (x86)
|
||||||
@ -147,16 +147,40 @@ jobs:
|
|||||||
echo "Dockerfile: ${{ steps.settings.outputs.dockerfile }}"
|
echo "Dockerfile: ${{ steps.settings.outputs.dockerfile }}"
|
||||||
echo "Tag: ${{ steps.settings.outputs.tag }}"
|
echo "Tag: ${{ steps.settings.outputs.tag }}"
|
||||||
|
|
||||||
|
# Verificar se o Dockerfile existe
|
||||||
|
if [ ! -f "${{ steps.settings.outputs.dockerfile }}" ]; then
|
||||||
|
echo "❌ Dockerfile não encontrado: ${{ steps.settings.outputs.dockerfile }}"
|
||||||
|
echo "📂 Arquivos na raiz:"
|
||||||
|
ls -la
|
||||||
|
echo "📂 Arquivos em src/BCards.Web/:"
|
||||||
|
ls -la src/BCards.Web/ || echo "Diretório não existe"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "✅ Dockerfile encontrado: ${{ steps.settings.outputs.dockerfile }}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Build para a plataforma correta
|
# Build para a plataforma correta
|
||||||
docker buildx build \
|
if [ "${{ steps.settings.outputs.deploy_target }}" = "production" ]; then
|
||||||
--platform ${{ steps.settings.outputs.platform }} \
|
# Build para produção (main branch)
|
||||||
--file ${{ steps.settings.outputs.dockerfile }} \
|
docker buildx build \
|
||||||
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.settings.outputs.tag }} \
|
--platform ${{ steps.settings.outputs.platform }} \
|
||||||
--push \
|
--file ${{ steps.settings.outputs.dockerfile }} \
|
||||||
--build-arg VERSION=${{ steps.settings.outputs.version || 'latest' }} \
|
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.settings.outputs.tag }} \
|
||||||
--build-arg COMMIT=${{ steps.settings.outputs.commit }} \
|
--push \
|
||||||
--progress=plain \
|
--progress=plain \
|
||||||
.
|
.
|
||||||
|
else
|
||||||
|
# Build para staging (Release branches)
|
||||||
|
docker buildx build \
|
||||||
|
--platform ${{ steps.settings.outputs.platform }} \
|
||||||
|
--file ${{ steps.settings.outputs.dockerfile }} \
|
||||||
|
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.settings.outputs.tag }} \
|
||||||
|
--push \
|
||||||
|
--build-arg VERSION=${{ steps.settings.outputs.version || 'latest' }} \
|
||||||
|
--build-arg COMMIT=${{ steps.settings.outputs.commit }} \
|
||||||
|
--progress=plain \
|
||||||
|
.
|
||||||
|
fi
|
||||||
|
|
||||||
deploy-production:
|
deploy-production:
|
||||||
name: Deploy to Production (ARM - OCI)
|
name: Deploy to Production (ARM - OCI)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user