update ci and setup nomad
All checks were successful
Build and Push Container / Build App (push) Successful in 57s
Build and Push Container / Publish App (push) Has been skipped

This commit is contained in:
2026-01-16 16:09:54 +11:00
parent b358d84f4d
commit e15c6af515
2 changed files with 96 additions and 26 deletions

View File

@@ -65,33 +65,33 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# - name: Build and Push Image
# uses: docker/build-push-action@v6
# with:
# file: Dockerfile
# push: true
# tags: ${{ steps.metadata.outputs.tags }}
# labels: ${{ steps.metadata.outputs.labels }}
# build-args: |
# DATABASE_URL=${{ secrets.DATABASE_URL }}
- name: Build and Push Image
uses: docker/build-push-action@v6
with:
file: Dockerfile
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
build-args: |
DATABASE_URL=${{ secrets.DATABASE_URL }}
# - name: Install dependencies
# run: pnpm install --frozen-lockfile
- name: Install dependencies
run: pnpm install --frozen-lockfile
# - name: Run Migrations
# run: pnpm --filter amoc payload migrate
# env:
# DATABASE_URL: ${{ secrets.DATABASE_URL }}
- name: Run Migrations
run: pnpm --filter amoc payload migrate
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
# - name: Setup Nomad
# uses: hashicorp/setup-nomad@main
# with:
# nomad_version: '1.10.5'
- name: Setup Nomad
uses: hashicorp/setup-nomad@main
with:
nomad_version: '1.10.5'
# - name: Deploy Job to Nomad
# run: |
# export DEPLOYMENT_VERSION="${GITHUB_SHA:0:7}-$(date +%s)"
# nomad job run -var="deployment_version=$DEPLOYMENT_VERSION" infra/nomad/portfolio.nomad.hcl
# env:
# NOMAD_ADDR: ${{ vars.NOMAD_ADDR }}
# NOMAD_TOKEN: ${{ secrets.NOMAD_TOKEN }}
- name: Deploy Job to Nomad
run: |
export DEPLOYMENT_VERSION="${GITHUB_SHA:0:7}-$(date +%s)"
nomad job run -var="deployment_version=$DEPLOYMENT_VERSION" infra/nomad/portfolio.nomad.hcl
env:
NOMAD_ADDR: ${{ vars.NOMAD_ADDR }}
NOMAD_TOKEN: ${{ secrets.NOMAD_TOKEN }}