From fcf2e25c15fd045fd7580071a72438187575e493 Mon Sep 17 00:00:00 2001 From: Ricardo Campos Date: Tue, 7 Apr 2026 17:59:50 -0300 Subject: [PATCH] Create build-app-candidate.yml --- .github/workflows/build-app-candidate.yml | 96 +++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 .github/workflows/build-app-candidate.yml diff --git a/.github/workflows/build-app-candidate.yml b/.github/workflows/build-app-candidate.yml new file mode 100644 index 0000000..0d1e778 --- /dev/null +++ b/.github/workflows/build-app-candidate.yml @@ -0,0 +1,96 @@ +name: Build App Candidate + +on: + workflow_dispatch: + +jobs: + build-and-push-app: + name: Build & Push App + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.ref }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }}/app + tags: | + type=raw,value=candidade + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: ./client + push: true + tags: candidate + cache-from: type=gha + cache-to: type=gha,mode=max + build-args: | + VITE_BUILD=v${DATE}.${{ github.run_number }}" +name: Build App Candidate + +on: + workflow_dispatch: + +jobs: + build-and-push-app: + name: Build & Push App + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.ref }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }}/app + tags: | + type=raw,value=candidade + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: ./client + push: true + tags: candidate + cache-from: type=gha + cache-to: type=gha,mode=max + build-args: | + VITE_BUILD=v${DATE}.${{ github.run_number }}"