Development CI / check-and-package (push) Successful in 3m52s
GitHub Git mirror / mirror (push) Successful in 5s
Main CI / check-and-package (pull_request) Successful in 3m51s
Development CI / image (push) Successful in 20s
Main CI / image (pull_request) Successful in 12s
Development CI / deploy-development (push) Successful in 5s
54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
name: Deploy production manually
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: Completed date-hash release version
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: rawmark-production
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
deploy:
|
|
if: gitea.ref == 'refs/heads/main'
|
|
runs-on: docker
|
|
timeout-minutes: 20
|
|
container:
|
|
image: docker:29-cli
|
|
volumes:
|
|
- /docker/gitea/main/RawMark:/docker/gitea/main/RawMark
|
|
- /docker/gitea/mirrors/RawMark:/docker/gitea/mirrors/RawMark
|
|
env:
|
|
GITEA_API_URL: ${{ gitea.server_url }}/api/v1
|
|
GITEA_READ_TOKEN: ${{ gitea.token }}
|
|
RELEASE_VERSION: ${{ inputs.version }}
|
|
DOCKER_CONFIG: /tmp/rawmark-anonymous-docker
|
|
defaults:
|
|
run:
|
|
shell: sh
|
|
steps:
|
|
- name: Install deployment runtimes
|
|
run: apk add --no-cache nodejs python3 git docker-cli-compose
|
|
- uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
with:
|
|
ref: main
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
- name: Verify completed release, back up and deploy only RawMark
|
|
run: |
|
|
set -eu
|
|
mkdir -p "$DOCKER_CONFIG"
|
|
chmod 700 "$DOCKER_CONFIG"
|
|
python3 scripts/deploy.py production --directory /docker/gitea/main/RawMark \
|
|
--version "$RELEASE_VERSION" --client-container "$(hostname)"
|
|
- name: Remove job configuration
|
|
if: always()
|
|
run: rm -rf "$DOCKER_CONFIG"
|