Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ on:
- both
- web
- admin
force_redeploy:
description: "Create empty commit when release branch is already up to date"
required: true
default: false
type: boolean

jobs:
generate_tag:
Expand Down Expand Up @@ -57,6 +62,7 @@ jobs:
MAIN_SHA=$(git rev-parse origin/main)

TARGET="${{ github.event.inputs.target }}"
FORCE_REDEPLOY="${{ github.event.inputs.force_redeploy }}"

case "$TARGET" in
web)
Expand Down Expand Up @@ -98,6 +104,18 @@ jobs:
fi

if [ "$MAIN_SHA" = "$RELEASE_SHA" ]; then
if [ "$FORCE_REDEPLOY" = "true" ]; then
git checkout -B "$BRANCH" "origin/$BRANCH"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit --allow-empty -m "chore: force redeploy trigger for $BRANCH"
git push origin "HEAD:refs/heads/$BRANCH"
{
echo "- $BRANCH: force redeploy commit created"
} >> "$GITHUB_STEP_SUMMARY"
continue
fi

{
echo "- $BRANCH: already up to date"
} >> "$GITHUB_STEP_SUMMARY"
Expand Down