Skip to content

DucksManager daily #332

DucksManager daily

DucksManager daily #332

Workflow file for this run

name: "DucksManager daily"
on:
schedule:
- cron: "0 1 * * *"
workflow_dispatch:
jobs:
coa-updater:
runs-on: ubuntu-latest
environment: production
steps:
- uses: appleboy/[email protected]
with:
host: ${{ secrets.PRODUCTION_SSH_HOST }}
fingerprint: ${{ secrets.PRODUCTION_SSH_FINGERPRINT }}
username: ${{ secrets.PRODUCTION_SSH_USER }}
key: ${{ secrets.PRODUCTION_SSH_KEY }}
script_stop: true
command_timeout: 40m
script: |
cd workspace/DucksManager2/apps/coa-updater
docker compose pull coa-updater
docker compose run --rm --no-deps coa-updater | ts "[%Y-%m-%d %H:%M:%S]"
stats-updater:
needs: ["coa-updater"]
runs-on: ubuntu-latest
environment: production
steps:
- name: Run stats-updater
uses: appleboy/[email protected]
with:
host: ${{ secrets.PRODUCTION_SSH_HOST }}
username: ${{ secrets.PRODUCTION_SSH_USER }}
key: ${{ secrets.PRODUCTION_SSH_KEY }}
script_stop: true
command_timeout: 45m
script: |
cd workspace/DucksManager2
docker compose pull stats-updater
docker compose run --rm --no-deps stats-updater
cover-updater:
needs: ["coa-updater"]
runs-on: ubuntu-latest
environment: production
steps:
- uses: appleboy/[email protected]
with:
host: ${{ secrets.PRODUCTION_SSH_HOST }}
username: ${{ secrets.PRODUCTION_SSH_USER }}
key: ${{ secrets.PRODUCTION_SSH_KEY }}
command_timeout: 20m
script_stop: true
script: |
cd workspace/DucksManager2
docker compose pull cover-updater
docker compose run --rm --no-deps cover-updater
# duck-estimator:
# needs: ["coa-updater"]
# runs-on: ubuntu-latest
# environment: production
# steps:
# - uses: appleboy/[email protected]
# with:
# host: ${{ secrets.PRODUCTION_SSH_HOST }}
# username: ${{ secrets.PRODUCTION_SSH_USER }}
# key: ${{ secrets.PRODUCTION_SSH_KEY }}
# command_timeout: 60m
# script: |
# cd workspace/DucksManager2/apps/duck-estimator
# echo ${{ secrets.DOCKER_REGISTRY_TOKEN_DM }} | docker login ghcr.io -u bperel --password-stdin
# docker compose pull
# docker compose run --rm duck-estimator
sprite-names-updater:
needs: ["cover-updater"]
runs-on: ubuntu-latest
environment: production
steps:
- uses: appleboy/[email protected]
with:
host: ${{ secrets.PRODUCTION_SSH_HOST }}
username: ${{ secrets.PRODUCTION_SSH_USER }}
key: ${{ secrets.PRODUCTION_SSH_KEY }}
script_stop: true
command_timeout: 5m
script: |
cd workspace/DucksManager2
docker compose run --rm --no-deps sprite-names-updater
subscription-handler:
needs: ["coa-updater"]
runs-on: ubuntu-latest
environment: production
steps:
- uses: appleboy/[email protected]
env:
SUBSCRIPTIONS_BASIC_AUTH: ${{ secrets.PRODUCTION_SUBSCRIPTIONS_BASIC_AUTH }}
with:
host: ${{ secrets.PRODUCTION_SSH_HOST }}
username: ${{ secrets.PRODUCTION_SSH_USER }}
key: ${{ secrets.PRODUCTION_SSH_KEY }}
script_stop: true
command_timeout: 5m
envs: SUBSCRIPTIONS_BASIC_AUTH
script: |
cd workspace/dm-server
docker compose run --rm --no-deps subscription-runner | ts '[%Y-%m-%d %H:%M:%S]'
curl --location --request POST "https://api.ducksmanager.net/ducksmanager/emails/subscription/release" \
--header "x-dm-version: 1.0.0" \
--header "Content-Type: application/x-www-form-urlencoded" \
--header "Authorization: Basic $SUBSCRIPTIONS_BASIC_AUTH"