2 Commits

Author SHA1 Message Date
aa9edb0f65 Update workflows 2026-04-12 21:37:07 -04:00
454f706876 Seed platforms 2026-04-12 20:58:03 -04:00
3 changed files with 83 additions and 1 deletions

View File

@@ -67,6 +67,26 @@ jobs:
echo "$KUBECONFIG_CONTENT" | base64 -d > ~/.kube/config echo "$KUBECONFIG_CONTENT" | base64 -d > ~/.kube/config
chmod 600 ~/.kube/config chmod 600 ~/.kube/config
- name: Run database migrations
run: |
echo "🗄️ Running database migrations..."
# Delete old migration job if it exists
kubectl delete job turbovault-migrate -n turbovault --ignore-not-found=true
# Update the migration job with the new image version
sed "s|image: ghcr.io/ryankazokas/turbovault-app:.*|image: ghcr.io/ryankazokas/turbovault-app:${{ steps.version.outputs.tag }}|" \
k8s/migrate-job.yaml | kubectl apply -f -
# Wait for migration to complete
echo "⏳ Waiting for migrations to complete..."
kubectl wait --for=condition=complete --timeout=5m job/turbovault-migrate -n turbovault
echo "✅ Migrations complete!"
echo ""
echo "📋 Migration logs:"
kubectl logs job/turbovault-migrate -n turbovault
- name: Deploy to Kubernetes - name: Deploy to Kubernetes
run: | run: |
echo "🚀 Deploying version ${{ steps.version.outputs.tag }} to Kubernetes..." echo "🚀 Deploying version ${{ steps.version.outputs.tag }} to Kubernetes..."

View File

@@ -122,6 +122,8 @@ GEM
tzinfo tzinfo
ffi (1.17.4-aarch64-linux-gnu) ffi (1.17.4-aarch64-linux-gnu)
ffi (1.17.4-aarch64-linux-musl) ffi (1.17.4-aarch64-linux-musl)
ffi (1.17.4-arm-linux-gnu)
ffi (1.17.4-arm-linux-musl)
ffi (1.17.4-arm64-darwin) ffi (1.17.4-arm64-darwin)
ffi (1.17.4-x86_64-darwin) ffi (1.17.4-x86_64-darwin)
ffi (1.17.4-x86_64-linux-gnu) ffi (1.17.4-x86_64-linux-gnu)
@@ -214,6 +216,10 @@ GEM
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.19.2-aarch64-linux-musl) nokogiri (1.19.2-aarch64-linux-musl)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.19.2-arm-linux-gnu)
racc (~> 1.4)
nokogiri (1.19.2-arm-linux-musl)
racc (~> 1.4)
nokogiri (1.19.2-arm64-darwin) nokogiri (1.19.2-arm64-darwin)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.19.2-x86_64-darwin) nokogiri (1.19.2-x86_64-darwin)
@@ -340,7 +346,7 @@ GEM
logger logger
rubyzip (3.2.2) rubyzip (3.2.2)
securerandom (0.4.1) securerandom (0.4.1)
selenium-webdriver (4.43.0) selenium-webdriver (4.41.0)
base64 (~> 0.2) base64 (~> 0.2)
logger (~> 1.4) logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5) rexml (~> 3.2, >= 3.2.5)
@@ -450,6 +456,8 @@ PLATFORMS
aarch64-linux aarch64-linux
aarch64-linux-gnu aarch64-linux-gnu
aarch64-linux-musl aarch64-linux-musl
arm-linux-gnu
arm-linux-musl
arm64-darwin arm64-darwin
x86_64-darwin x86_64-darwin
x86_64-linux x86_64-linux

View File

@@ -0,0 +1,54 @@
class SeedPlatforms < ActiveRecord::Migration[8.1]
def up
platforms = [
# Nintendo
{ name: "Nintendo Entertainment System", abbreviation: "NES", manufacturer: "Nintendo" },
{ name: "Super Nintendo Entertainment System", abbreviation: "SNES", manufacturer: "Nintendo" },
{ name: "Nintendo 64", abbreviation: "N64", manufacturer: "Nintendo" },
{ name: "Nintendo GameCube", abbreviation: "GCN", manufacturer: "Nintendo" },
{ name: "Nintendo Wii", abbreviation: "Wii", manufacturer: "Nintendo" },
{ name: "Nintendo Wii U", abbreviation: "Wii U", manufacturer: "Nintendo" },
{ name: "Nintendo Switch", abbreviation: "Switch", manufacturer: "Nintendo" },
{ name: "Game Boy", abbreviation: "GB", manufacturer: "Nintendo" },
{ name: "Game Boy Color", abbreviation: "GBC", manufacturer: "Nintendo" },
{ name: "Game Boy Advance", abbreviation: "GBA", manufacturer: "Nintendo" },
{ name: "Nintendo DS", abbreviation: "NDS", manufacturer: "Nintendo" },
{ name: "Nintendo 3DS", abbreviation: "3DS", manufacturer: "Nintendo" },
# Sony
{ name: "PlayStation", abbreviation: "PS1", manufacturer: "Sony" },
{ name: "PlayStation 2", abbreviation: "PS2", manufacturer: "Sony" },
{ name: "PlayStation 3", abbreviation: "PS3", manufacturer: "Sony" },
{ name: "PlayStation 4", abbreviation: "PS4", manufacturer: "Sony" },
{ name: "PlayStation 5", abbreviation: "PS5", manufacturer: "Sony" },
{ name: "PlayStation Portable", abbreviation: "PSP", manufacturer: "Sony" },
{ name: "PlayStation Vita", abbreviation: "Vita", manufacturer: "Sony" },
# Microsoft
{ name: "Xbox", abbreviation: "Xbox", manufacturer: "Microsoft" },
{ name: "Xbox 360", abbreviation: "X360", manufacturer: "Microsoft" },
{ name: "Xbox One", abbreviation: "XB1", manufacturer: "Microsoft" },
{ name: "Xbox Series X/S", abbreviation: "XSX", manufacturer: "Microsoft" },
# Sega
{ name: "Sega Genesis", abbreviation: "Genesis", manufacturer: "Sega" },
{ name: "Sega Saturn", abbreviation: "Saturn", manufacturer: "Sega" },
{ name: "Sega Dreamcast", abbreviation: "DC", manufacturer: "Sega" },
{ name: "Sega Game Gear", abbreviation: "GG", manufacturer: "Sega" },
# PC
{ name: "PC", abbreviation: "PC", manufacturer: nil },
# Other
{ name: "Atari 2600", abbreviation: "2600", manufacturer: "Atari" }
]
platforms.each do |platform|
Platform.create!(platform)
end
end
def down
Platform.delete_all
end
end