This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow-site-archive.git


The following commit(s) were added to refs/heads/main by this push:
     new f50ce3abdb2 Add manual workflow to reset staging to main (#47)
f50ce3abdb2 is described below

commit f50ce3abdb27dc4543ee7d17fb512afb7c558715
Author: Shahar Epstein <[email protected]>
AuthorDate: Thu Sep 24 14:05:53 2026 +0300

    Add manual workflow to reset staging to main (#47)
    
    The staging branch pins GitHub Action SHAs that are no longer on the ASF
    allowlist, so "Sync S3 to GitHub" dispatched on staging ends in
    startup_failure. Mirror the "Reset staging to main" workflow from
    apache/airflow-site so the branch can be brought back in line with main.
    
    The ref is moved through the Git refs API instead of a clone-and-push,
    since the repository holds GBs of archived docs.
    
    Generated-by: Claude Opus 5.5
---
 .github/workflows/reset-staging.yml | 58 +++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/.github/workflows/reset-staging.yml 
b/.github/workflows/reset-staging.yml
new file mode 100644
index 00000000000..6fdeb53063e
--- /dev/null
+++ b/.github/workflows/reset-staging.yml
@@ -0,0 +1,58 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+---
+name: Reset staging to main
+
+"on":
+  workflow_dispatch:
+permissions:
+  contents: read
+concurrency:
+  group: reset-staging-to-main
+  cancel-in-progress: false
+jobs:
+  reset-staging:
+    runs-on: ubuntu-latest
+    permissions:
+      # Needed to force push to staging
+      contents: write
+    steps:
+      # The repository holds GBs of archived docs, so move the ref through the
+      # API instead of cloning it.
+      - name: 🚀 Force update staging to main
+        env:
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          REPOSITORY: ${{ github.repository }}
+        run: |
+          set -euo pipefail
+          MAIN_SHA="$(gh api "repos/${REPOSITORY}/git/ref/heads/main" --jq 
.object.sha)"
+          STAGING_SHA="$(gh api "repos/${REPOSITORY}/git/ref/heads/staging" 
--jq .object.sha)"
+          echo "Previous staging: ${STAGING_SHA}"
+          echo "New staging (main): ${MAIN_SHA}"
+          {
+            echo "### Reset staging to main"
+            echo ""
+            echo "- Previous staging: \`${STAGING_SHA}\`"
+            echo "- New staging: \`${MAIN_SHA}\`"
+          } >> "${GITHUB_STEP_SUMMARY}"
+          if [[ "${MAIN_SHA}" == "${STAGING_SHA}" ]]; then
+            echo "staging already points to main, nothing to update."
+            exit 0
+          fi
+          gh api -X PATCH "repos/${REPOSITORY}/git/refs/heads/staging" \
+            -f sha="${MAIN_SHA}" -F force=true

Reply via email to