Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f0e809940 | ||
|
|
e6ce5e26c7 | ||
|
|
fee4a2eb13 |
No files matched your search
@@ -44,3 +44,54 @@ jobs:
|
||||
files: |-
|
||||
tern-web-*.tgz
|
||||
tern-web-*.tgz.sha256
|
||||
|
||||
# Deploys the release to tern.mtps.pl (kara, deploy/compose). It lives
|
||||
# here rather than in tern-server because tags are pushed server-first and
|
||||
# the single runner works through them in order, so by the time this runs
|
||||
# both the server image and this webapp release exist. A deploy job in
|
||||
# tern-server would have to wait for this repo's release while holding
|
||||
# the only runner.
|
||||
deploy:
|
||||
needs: release
|
||||
runs-on: rocky-10
|
||||
steps:
|
||||
# The deployment definition is versioned with the server it deploys.
|
||||
- name: Check out deployment definition
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: mtps/tern-server
|
||||
ref: ${{ gitea.ref_name }}
|
||||
|
||||
- name: Check the server image exists
|
||||
env:
|
||||
IMAGE: git.app.ygg/mtps/tern-server
|
||||
TAG: ${{ gitea.ref_name }}
|
||||
run: |
|
||||
# Fails fast with a clear message if the server release didn't
|
||||
# publish this version (failed, or still running on another
|
||||
# runner), instead of a deploy that can't pull its image.
|
||||
VERSION="${TAG#v}"
|
||||
for i in $(seq 1 20); do
|
||||
docker manifest inspect "$IMAGE:$VERSION" >/dev/null 2>&1 && exit 0
|
||||
echo "waiting for $IMAGE:$VERSION ($i/20)"
|
||||
sleep 30
|
||||
done
|
||||
echo "::error::$IMAGE:$VERSION not found in the registry — did the tern-server release succeed?"
|
||||
exit 1
|
||||
|
||||
- name: Derive version
|
||||
id: version
|
||||
env:
|
||||
TAG: ${{ gitea.ref_name }}
|
||||
run: echo "version=${TAG#v}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Deploy
|
||||
uses: https://git.app.ygg/ygg/actions/deploy@v2
|
||||
with:
|
||||
type: compose
|
||||
dist-path: deploy/tern.yml
|
||||
extra-vars: |
|
||||
version=${{ steps.version.outputs.version }}
|
||||
ssh-key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
known-hosts: ${{ secrets.DEPLOY_KNOWN_HOSTS }}
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "tern-web",
|
||||
"version": "0.7.0",
|
||||
"version": "0.8.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "tern-web",
|
||||
"version": "0.7.0",
|
||||
"version": "0.8.1",
|
||||
"devDependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
||||
"@tsconfig/svelte": "^5.0.4",
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tern-web",
|
||||
"private": true,
|
||||
"version": "0.7.0",
|
||||
"version": "0.8.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
Reference in new issue
Block a user