This commit is contained in:
zk
2026-05-08 17:44:07 +00:00
parent 3664e9ddf0
commit 38e652de92
5 changed files with 42 additions and 4 deletions
+1 -1
View File
@@ -74,4 +74,4 @@ jobs:
- name: Deploy updates
env:
TACHI_HOST: ${{ secrets.TACHI_HOST }}
run: ssh "ci@${TACHI_HOST}" "/home/ci/tachi-deploy/scripts/deploy-bot.sh ${{ matrix.destination }} ${{ github.sha }}"
run: ssh "ci@${TACHI_HOST}" "/home/ci/tachi-deploy/swarm/scripts/deploy-bot.sh ${{ matrix.destination }} ${{ github.sha }}"
+1 -1
View File
@@ -63,4 +63,4 @@ jobs:
- name: Deploy seeds
env:
TACHI_HOST: ${{ secrets.TACHI_HOST }}
run: ssh -i ~/.ssh/id_rsa "ci@${TACHI_HOST}" /home/ci/tachi-deploy/scripts/deploy-seeds.sh "${{ github.sha }}"
run: ssh -i ~/.ssh/id_rsa "ci@${TACHI_HOST}" /home/ci/tachi-deploy/swarm/scripts/deploy-seeds.sh "${{ github.sha }}"
+1 -1
View File
@@ -68,4 +68,4 @@ jobs:
- name: Deploy updates
env:
TACHI_HOST: ${{ secrets.TACHI_HOST }}
run: ssh "ci@${TACHI_HOST}" "/home/ci/tachi-deploy/scripts/deploy-ghbot.sh ${{ github.sha }}"
run: ssh "ci@${TACHI_HOST}" "/home/ci/tachi-deploy/swarm/scripts/deploy-ghbot.sh ${{ github.sha }}"
@@ -0,0 +1,38 @@
name: Migration immutability
# Reject PRs that modify, delete, rename, or copy existing SQL migrations.
# Adding new files under db/migrations/ is allowed.
on:
pull_request:
branches:
- main
paths:
- "db/migrations/**"
- ".github/workflows/migration-immutability.yml"
permissions:
contents: read
jobs:
no-mutation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
fetch-depth: 0
- name: Reject modified or deleted migrations
run: |
set -euo pipefail
base="${{ github.event.pull_request.base.sha }}"
head="${{ github.event.pull_request.head.sha }}"
diff_out=$(git diff --name-status "$base" "$head" -- db/migrations/)
bad_lines=$(printf '%s\n' "$diff_out" | awk 'NF && $1 != "A" { print }' || true)
if [[ -n "$bad_lines" ]]; then
echo "::error::SQL migrations under db/migrations/ must not be modified, deleted, renamed, or copied. Add a new migration file instead."
echo "$bad_lines"
exit 1
fi
+1 -1
View File
@@ -170,4 +170,4 @@ jobs:
- name: Deploy on server
env:
TACHI_HOST: ${{ secrets.TACHI_HOST }}
run: ssh "ci@${TACHI_HOST}" "/home/ci/tachi-deploy/scripts/deploy-server.sh ${{ matrix.destination }} ${{ github.sha }}"
run: ssh "ci@${TACHI_HOST}" "/home/ci/tachi-deploy/swarm/scripts/deploy-server.sh ${{ matrix.destination }} ${{ github.sha }}"