Skip to content

Add nginx frontend

Add nginx frontend #11

Workflow file for this run

name: Build
permissions:
contents: read
id-token: write
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_call:
env:
BACKEND_IMAGE_REF: us-west1-docker.pkg.dev/${{ secrets.GCP_PROJECT_SLUG }}/firetower-docker/firetower:${{ github.sha }}
STATIC_IMAGE_REF: us-west1-docker.pkg.dev/${{ secrets.GCP_PROJECT_SLUG }}/firetower-docker/nginx:${{ github.sha }}
jobs:
ci:
uses: ./.github/workflows/ci.yml
build:
needs: [ci]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Authenticate with GCP
uses: 'google-github-actions/auth@v3'
with:
project_id: ${{ secrets.GCP_PROJECT_SLUG }}
workload_identity_provider: projects/${{ secrets.GCP_PROJECT_NUM }}/locations/global/workloadIdentityPools/github/providers/github-prvdr
- name: Login to Artifact Registry
run: gcloud auth configure-docker us-west1-docker.pkg.dev
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push (backend)
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ env.BACKEND_IMAGE_REF }}
file: docker/backend.Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push (static assets)
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ env.STATIC_IMAGE_REF }}
file: docker/static.Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max