Skip to content

fix: update playbook schema #2781

fix: update playbook schema

fix: update playbook schema #2781

Workflow file for this run

on:
push:
branches:
- main
pull_request:
name: Test
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: buildjet/setup-go@v5
with:
go-version: 1.22.x
- name: Checkout code
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- uses: buildjet/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
.bin
key: cache-${{ hashFiles('**/go.sum') }}-${{ hashFiles('.bin/*') }}
restore-keys: |
cache-
- name: Test
run: make test
migrate:
runs-on: ubuntu-latest
env:
migrate_command: make -B tidy hack/migrate/go.mod && cd hack/migrate && go run main.go --db-url 'postgres://postgres:postgres@localhost:5432/mission-control?sslmode=disable'
steps:
- name: Install Go
uses: buildjet/setup-go@v5
with:
go-version: 1.22.x
- name: Check out main branch
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
ref: main
- name: Apply base migrations
run: ${{ env.migrate_command }}
- name: Check out current branch
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- name: Apply new migrations
run: ${{ env.migrate_command }}
services:
postgres:
image: postgres:15.5@sha256:ee2f170c46df225310c923010230434e269238a65307539f9aced9da6ca44fad
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: mission-control
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5