From ba5b982008160d400d75b44ade8ffc727d7df2c5 Mon Sep 17 00:00:00 2001
From: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Date: Wed, 25 Sep 2024 10:44:35 -0600
Subject: [PATCH] Automatically tag automatic releases as `nightly` (#48101)

* auto tag nightly releases

* update dependencies
---
 .github/workflows/release-tag.yml | 24 ++++++++++++++++++++++++
 .github/workflows/release.yml     | 13 ++++++++++++-
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml
index df743e107b7..f17e3b0f1dc 100644
--- a/.github/workflows/release-tag.yml
+++ b/.github/workflows/release-tag.yml
@@ -28,6 +28,30 @@ on:
         description: Apply to OSS
         type: boolean
         default: true
+  workflow_call:
+    inputs:
+      version:
+        type: string
+        required: true
+      tag_name:
+        type: string
+        # options:
+        #   - nightly
+        #   - beta
+        #   - latest
+        required: true
+      tag_rollout:
+        description: Rollout % (0-100)
+        type: number
+        default: 100
+      tag_ee:
+        description: Apply to EE
+        type: boolean
+        default: true
+      tag_oss:
+        description: Apply to OSS
+        type: boolean
+        default: true
 
 jobs:
   check-version:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index baf4950c5d7..0f0587b15bb 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -687,6 +687,17 @@ jobs:
         --distribution-id ${{ vars.AWS_CLOUDFRONT_STATIC_ID }} \
         --paths "/version-info.json" "/version-info-ee.json"
 
+  tag-nightly:
+    if: ${{ inputs.auto }}
+    needs: [push-tags, verify-docker-pull, verify-s3-download]
+    uses: ./.github/workflows/release-tag.yml
+    with:
+      version: ${{ inputs.version }}
+      tag_name: nightly
+      tag_rollout: 100
+      tag_ee: true
+      tag_oss: true
+
   publish-complete-message:
     if: ${{ !inputs.auto }}
     runs-on: ubuntu-22.04
@@ -719,7 +730,7 @@ jobs:
   auto-publish-complete-message:
     if: ${{ inputs.auto }}
     runs-on: ubuntu-22.04
-    needs: [push-tags, verify-docker-pull, verify-s3-download]
+    needs: tag-nightly
     timeout-minutes: 5
     steps:
       - uses: actions/checkout@v4
-- 
GitLab