fix: deploy
All checks were successful
Deploy ASP.NET MVC to OCI / build-and-deploy (push) Successful in 4m22s

This commit is contained in:
Ricardo Carneiro 2025-09-14 00:53:28 -03:00
parent a530a40b4b
commit 1f379db3a2

View File

@ -15,17 +15,17 @@ jobs:
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@v2
- name: Set build variables - name: Set build variables
id: vars id: vars
run: | run: |
if [[ ${{ github.ref }} == refs/heads/main ]] || [[ ${{ github.ref }} == refs/heads/master ]]; then if [[ "${{ github.ref }}" == "refs/heads/main" ]] || [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "PLATFORM=linux/arm64" >> $GITHUB_OUTPUT echo "PLATFORM=linux/arm64" >> $GITHUB_OUTPUT
echo "TARGET_ARCH=arm64" >> $GITHUB_OUTPUT echo "TARGET_ARCH=arm64" >> $GITHUB_OUTPUT
echo "TAG_SUFFIX=" >> $GITHUB_OUTPUT echo "TAG_SUFFIX=" >> $GITHUB_OUTPUT
echo "DEPLOY_ENV=production" >> $GITHUB_OUTPUT echo "DEPLOY_ENV=production" >> $GITHUB_OUTPUT
elif [[ ${{ github.ref }} == refs/heads/release/* ]]; then elif [[ "${{ github.ref }}" == refs/heads/release/* ]]; then
echo "PLATFORM=linux/amd64" >> $GITHUB_OUTPUT echo "PLATFORM=linux/amd64" >> $GITHUB_OUTPUT
echo "TARGET_ARCH=amd64" >> $GITHUB_OUTPUT echo "TARGET_ARCH=amd64" >> $GITHUB_OUTPUT
echo "TAG_SUFFIX=-staging" >> $GITHUB_OUTPUT echo "TAG_SUFFIX=-staging" >> $GITHUB_OUTPUT
@ -38,7 +38,7 @@ jobs:
fi fi
- name: Cache Docker layers - name: Cache Docker layers
uses: actions/cache@v4 uses: actions/cache@v3
with: with:
path: /tmp/.buildx-cache path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ steps.vars.outputs.TARGET_ARCH }}-${{ github.sha }} key: ${{ runner.os }}-buildx-${{ steps.vars.outputs.TARGET_ARCH }}-${{ github.sha }}
@ -47,7 +47,7 @@ jobs:
${{ runner.os }}-buildx- ${{ runner.os }}-buildx-
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v4
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
@ -58,10 +58,8 @@ jobs:
registry.redecarneir.us/convertit:${{ github.sha }}${{ steps.vars.outputs.TAG_SUFFIX }} registry.redecarneir.us/convertit:${{ github.sha }}${{ steps.vars.outputs.TAG_SUFFIX }}
cache-from: | cache-from: |
type=local,src=/tmp/.buildx-cache type=local,src=/tmp/.buildx-cache
type=registry,ref=registry.redecarneir.us/convertit:cache-${{ steps.vars.outputs.TARGET_ARCH }}
cache-to: | cache-to: |
type=local,dest=/tmp/.buildx-cache-new,mode=max type=local,dest=/tmp/.buildx-cache-new,mode=max
type=registry,ref=registry.redecarneir.us/convertit:cache-${{ steps.vars.outputs.TARGET_ARCH }},mode=max
build-args: | build-args: |
BUILDKIT_INLINE_CACHE=1 BUILDKIT_INLINE_CACHE=1
TARGETARCH=${{ steps.vars.outputs.TARGET_ARCH }} TARGETARCH=${{ steps.vars.outputs.TARGET_ARCH }}