Повтор run 109 на теге v0.1.1 брал старый promote; promote/prune теперь клонируют EventHubDevOps с master, dispatch позволяет указать sha и tag. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,6 +5,15 @@ on:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_tag:
|
||||
description: 'Release tag (например v0.1.1)'
|
||||
required: true
|
||||
default: 'v0.1.1'
|
||||
sha_tag:
|
||||
description: 'Образ sha-* (например sha-3f5dde498652)'
|
||||
required: true
|
||||
default: 'sha-3f5dde498652'
|
||||
|
||||
env:
|
||||
REGISTRY: git.sabilin.com/eventhub
|
||||
@@ -13,19 +22,25 @@ jobs:
|
||||
deploy-stage-core:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Compute image tags
|
||||
id: meta
|
||||
run: |
|
||||
echo "sha_tag=sha-${GITHUB_SHA::12}" >> "$GITHUB_OUTPUT"
|
||||
echo "release_tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
|
||||
set -euo pipefail
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
echo "sha_tag=${{ github.event.inputs.sha_tag }}" >> "$GITHUB_OUTPUT"
|
||||
echo "release_tag=${{ github.event.inputs.release_tag }}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "sha_tag=sha-${GITHUB_SHA::12}" >> "$GITHUB_OUTPUT"
|
||||
echo "release_tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Wait for Docker daemon
|
||||
run: bash scripts/ensure-docker-daemon.sh 240
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to registry
|
||||
uses: docker/login-action@v2
|
||||
@@ -39,7 +54,7 @@ jobs:
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
run: |
|
||||
bash scripts/run-promote-images.sh \
|
||||
bash scripts/clone-devops-run.sh scripts/promote-images.sh \
|
||||
"${{ steps.meta.outputs.sha_tag }}" \
|
||||
"${{ steps.meta.outputs.release_tag }}" \
|
||||
stage \
|
||||
@@ -49,7 +64,7 @@ jobs:
|
||||
env:
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
run: bash scripts/run-registry-prune.sh
|
||||
run: bash scripts/clone-devops-run.sh scripts/prune-registry-images.sh
|
||||
|
||||
- name: Deploy core on stage via SSH
|
||||
uses: appleboy/ssh-action@v0.1.5
|
||||
|
||||
Reference in New Issue
Block a user