Compare commits

Author SHA1 Message Date
renovate[bot] e74f728550 chore(deps): update rust crate serde_json to v1.0.154
CI / Test and publish (pull_request) Successful in 1m26s
2026-10-12 00:02:40 +00:00
6 changed files with 13 additions and 73 deletions

No files matched your search

-3
View File
@@ -1,3 +0,0 @@
API_URL=https://api.vacationplanner.ru
UPSTREAM_TIMEOUT_SECONDS=15
HTTP_PORT=8080
+1 -57
View File
@@ -9,7 +9,7 @@ on:
concurrency:
group: ci-${{ gitea.ref }}
cancel-in-progress: false
cancel-in-progress: true
permissions:
contents: read
@@ -19,8 +19,6 @@ jobs:
name: Test and publish
runs-on: ubuntu-latest
timeout-minutes: 30
outputs:
image: ${{ steps.publish.outputs.image }}
env:
IMAGE: code.popov.link/valentineus/vacationplanner2ics
TEST_IMAGE: vacationplanner2ics-test:ci-${{ gitea.run_id }}
@@ -77,7 +75,6 @@ jobs:
test "$(docker inspect --format '{{.State.ExitCode}}' "$SMOKE_CONTAINER")" = 0
- name: Publish to Gitea Container Registry
id: publish
if: >-
gitea.event_name != 'pull_request' &&
(gitea.ref == 'refs/heads/master' || startsWith(gitea.ref, 'refs/tags/v'))
@@ -100,62 +97,9 @@ jobs:
fi
docker tag "$RUNTIME_IMAGE" "$IMAGE:$TAG"
docker push "$IMAGE:$TAG"
printf 'image=%s:%s\n' "$IMAGE" "$TAG" >> "$GITHUB_OUTPUT"
- name: Remove temporary containers and image tags
if: always()
run: |
docker rm -f "$SMOKE_CONTAINER" 2>/dev/null || true
docker image rm "$TEST_IMAGE" "$RUNTIME_IMAGE" 2>/dev/null || true
deploy-server:
name: Deploy published image to production
needs: ci
if: >-
gitea.ref == 'refs/heads/master' &&
(gitea.event_name == 'push' || gitea.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
timeout-minutes: 10
env:
IMAGE: ${{ needs.ci.outputs.image }}
DEPLOY_SSH_HOST: ${{ secrets.DEPLOY_SSH_HOST }}
DEPLOY_SSH_PORT: ${{ secrets.DEPLOY_SSH_PORT }}
DEPLOY_SSH_USER: ${{ secrets.DEPLOY_SSH_USER }}
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
DEPLOY_SSH_PRIVATE_KEY_BASE64: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY_BASE64 }}
DEPLOY_SSH_KNOWN_HOSTS: ${{ secrets.DEPLOY_SSH_KNOWN_HOSTS }}
steps:
- name: Checkout deployment files
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Deploy and check readiness
shell: bash
run: |
set -Eeuo pipefail
umask 077
ssh_directory="$(mktemp -d)"
trap 'rm -rf "$ssh_directory"' EXIT
printf '%s' "$DEPLOY_SSH_PRIVATE_KEY_BASE64" | base64 --decode > "$ssh_directory/key"
printf '%s\n' "$DEPLOY_SSH_KNOWN_HOSTS" > "$ssh_directory/known_hosts"
ssh -i "$ssh_directory/key" -p "$DEPLOY_SSH_PORT" \
-o UserKnownHostsFile="$ssh_directory/known_hosts" \
-o StrictHostKeyChecking=yes -o BatchMode=yes -o IdentitiesOnly=yes \
-o ConnectTimeout=15 -o ConnectionAttempts=3 \
-o ServerAliveInterval=15 -o ServerAliveCountMax=3 \
"$DEPLOY_SSH_USER@$DEPLOY_SSH_HOST" "
set -eu
cd '$DEPLOY_PATH'
cat > compose.yaml
export IMAGE='$IMAGE'
docker compose pull app
sed -i '/^IMAGE=/d' .env
printf '\\nIMAGE=%s\\n' '$IMAGE' >> .env
docker compose up --pull never --detach --force-recreate app
bind_addr=\$(docker inspect --format '{{range .Config.Env}}{{println .}}{{end}}' \"\$(docker compose ps --quiet app)\" | sed -n 's/^BIND_ADDR=//p')
curl --fail --silent --show-error --retry 15 --retry-all-errors \
--retry-delay 2 --max-time 3 \"http://\$bind_addr/healthz\" | grep -qx ok
" < compose.yaml
Generated
+4 -4
View File
@@ -456,9 +456,9 @@ dependencies = [
[[package]]
name = "icalendar"
version = "0.17.15"
version = "0.17.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef7e7ae829dee4463f049b1f2855a7b0ba7a255bef3c06a09ca22a7befa4e9e4"
checksum = "785af055d3fda0cd975e77b358d8e5d20dd7dbcca6a61eefd197410b8a1cbfe7"
dependencies = [
"chrono",
"iso8601",
@@ -1296,9 +1296,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.54.1"
version = "1.53.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3"
checksum = "e95f91fcc7a621e8b030f6aa23c71fe9838ae2fb4d8118b75602a328f5144044"
dependencies = [
"bytes",
"libc",
+1 -1
View File
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM rust:1.99.1-alpine3.22 AS build
FROM rust:1.99.0-alpine3.22 AS build
RUN apk add --no-cache cmake make
WORKDIR /build
ARG TARGETARCH
+6 -7
View File
@@ -1,14 +1,13 @@
name: vacationplanner2ics
services:
app:
image: ${IMAGE:-code.popov.link/valentineus/vacationplanner2ics:latest}
pull_policy: always
network_mode: host
build:
context: .
target: runtime
environment:
BIND_ADDR: 127.0.0.1:${HTTP_PORT:-8080}
API_URL: ${API_URL:-https://api.vacationplanner.ru}
UPSTREAM_TIMEOUT_SECONDS: ${UPSTREAM_TIMEOUT_SECONDS:-15}
ports:
- "127.0.0.1:8080:8080"
restart: unless-stopped
read_only: true
cap_drop: [ALL]
@@ -17,7 +16,7 @@ services:
dev:
profiles: [dev]
image: rust:1.99.1-bookworm
image: rust:1.99.0-bookworm
working_dir: /workspace
command: sleep infinity
init: true
+1 -1
View File
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.99.1"
channel = "1.99.0"
profile = "minimal"
components = ["clippy", "rustfmt"]