Skip to content

Commit 24ab548

Browse files
authored
[FLINK-39573][cdc][docs] Fix Build documentation CI startup_failure by replacing third-party rsync action (apache#4385)
The Build documentation workflow has been failing with startup_failure since April 18, 2026 because burnett01/rsync-deployments is not allowed by the Apache Infra actions policy. Replace the third-party action with a local composite action that uses native rsync and ssh-agent, following the same approach used in FLINK-38448 for flink-kubernetes-operator. This eliminates the dependency on third-party actions entirely and avoids future breakage from allowed list changes or version expirations. Note: After merging, this action needs to be backported to release-3.5 and release-3.6 branches as well, since the workflow checks out those branches and requires the local action to be present.
1 parent bb5982b commit 24ab548

3 files changed

Lines changed: 92 additions & 2 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2019-2022 Contention
4+
Copyright (c) 2019-2026 Burnett01
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# Inspired by https://github.com/Burnett01/rsync-deployments/blob/7.1.0/action.yml
19+
name: Rsync Deploy
20+
description: Upload a folder to a remote destination via rsync over SSH.
21+
inputs:
22+
switches:
23+
description: rsync switches
24+
required: false
25+
default: "--archive --compress"
26+
path:
27+
description: Local source directory
28+
required: true
29+
remote_path:
30+
description: Remote destination directory
31+
required: true
32+
remote_host:
33+
description: SSH host
34+
required: true
35+
remote_port:
36+
description: SSH port
37+
required: false
38+
default: "22"
39+
remote_user:
40+
description: SSH username
41+
required: true
42+
remote_key:
43+
description: SSH private key (OpenSSH/PEM)
44+
required: true
45+
runs:
46+
using: composite
47+
steps:
48+
- name: rsync via ssh-agent
49+
shell: bash
50+
run: |
51+
set -euo pipefail
52+
53+
# Start agent and load the key
54+
eval "$(ssh-agent -s)"
55+
ssh-add - <<< "${{ inputs.remote_key }}"
56+
57+
# SSH command with host key checking disabled
58+
RSH="ssh -o StrictHostKeyChecking=no -p ${{ inputs.remote_port }}"
59+
60+
# Resolve paths and DSN
61+
LOCAL_PATH="$GITHUB_WORKSPACE/${{ inputs.path }}"
62+
DSN="${{ inputs.remote_user }}@${{ inputs.remote_host }}"
63+
64+
# Deploy
65+
rsync ${{ inputs.switches }} -e "$RSH" "$LOCAL_PATH" "$DSN:${{ inputs.remote_path }}"
66+
67+
# Cleanup identities from the agent
68+
ssh-add -D || true

.github/workflows/build_docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
docker run --rm --volume "$PWD:/root/flink-cdc" chesnay/flink-ci:java_8_11_17_21_maven_386 bash -c "cd /root/flink-cdc && chmod +x ./.github/workflows/docs.sh && ./.github/workflows/docs.sh"
8585
8686
- name: Upload documentation
87-
uses: burnett01/rsync-deployments@0dc935cdecc5f5e571865e60d2a6cdc673704823
87+
uses: ./.github/actions/rsync-deployments
8888
with:
8989
switches: --archive --compress --delete
9090
path: docs/target/
@@ -96,7 +96,7 @@ jobs:
9696

9797
- name: Upload documentation alias
9898
if: env.flink_alias != ''
99-
uses: burnett01/rsync-deployments@0dc935cdecc5f5e571865e60d2a6cdc673704823
99+
uses: ./.github/actions/rsync-deployments
100100
with:
101101
switches: --archive --compress --delete
102102
path: docs/target/

0 commit comments

Comments
 (0)