Skip to content

Commit

Permalink
Publish SQL migrations to minor version directory (#1249)
Browse files Browse the repository at this point in the history
Publish SQL migration scripts to a directory in the bucket named for the
minor version (e.g., "0.2") as well as the patch version (e.g.,
"0.2.17"). Going forward, downstream projects will consume migrations
from the minor version directory, but we publish to both places for now,
to ease the transition.

Part of #1240
  • Loading branch information
tgeoghegan authored Apr 13, 2023
1 parent 259254b commit 023c1d1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/publish-sql-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,15 @@ jobs:
install_components: "alpha"
- name: Get the version
id: get_version
run: echo VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT
run: |
VERSION=${GITHUB_REF/refs\/tags\//}
echo VERSION=${VERSION} >> $GITHUB_OUTPUT
echo "MINOR_VERSION=$(echo ${VERSION} | awk -F'.' '{if (NF != 3) {exit 1}; printf "%s.%s", $1, $2}')" >> $GITHUB_OUTPUT
- name: "Upload schema file(s)"
run: |-
gcloud alpha storage cp --recursive \
db \
gs://janus-artifacts-sql-schemas/${{ steps.get_version.outputs.VERSION }}/
gcloud alpha storage cp --recursive \
db \
gs://janus-artifacts-sql-schemas/${{ steps.get_version.outputs.MINOR_VERSION }}/

0 comments on commit 023c1d1

Please sign in to comment.