ci: deploy only successful validated revisions
This commit is contained in:
@@ -1,12 +1,10 @@
|
|||||||
name: Unraid autoredeploy
|
name: Unraid autoredeploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
|
workflows: ["GeoIntel release gates"]
|
||||||
|
types: [completed]
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths-ignore:
|
|
||||||
- ".gitea/**"
|
|
||||||
- "docs/**"
|
|
||||||
- "**/*.md"
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
@@ -19,13 +17,16 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy geointel
|
name: Deploy geointel
|
||||||
|
if: ${{ gitea.event_name == 'workflow_dispatch' || gitea.event.workflow_run.conclusion == 'success' }}
|
||||||
runs-on: deploy-geointel
|
runs-on: deploy-geointel
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
steps:
|
steps:
|
||||||
- name: Deploy exact Gitea revision
|
- name: Deploy exact validated Gitea revision
|
||||||
|
env:
|
||||||
|
DEPLOY_SHA: ${{ gitea.event.workflow_run.head_sha || gitea.sha }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
test -n "$DEPLOY_SHA"
|
||||||
docker exec gitea-deploy-control \
|
docker exec gitea-deploy-control \
|
||||||
/opt/gitea-deploy/deploy.py deploy \
|
/opt/gitea-deploy/deploy.py deploy \
|
||||||
"$GITHUB_REPOSITORY" "$GITHUB_SHA"
|
"$GITHUB_REPOSITORY" "$DEPLOY_SHA"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user