Abacn commented on code in PR #24230:
URL: https://github.com/apache/beam/pull/24230#discussion_r1032700155


##########
.github/workflows/start_snapshot_build.yml:
##########
@@ -0,0 +1,75 @@
+# 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.
+
+# This workflow will update apache beam master branch with next release version
+# and cut release branch for current development version.
+
+# To learn more about GitHub Actions in Apache Beam check the CI.md
+
+# This workflow will create an empty PR and start gradle publish job.
+
+name: Start Snapshot Build
+
+on:
+  workflow_dispatch:
+    inputs:
+      USER_REMOTE_URL:
+        description: Your beam repo URL
+        required: true
+        default: https://github.com/apache/beam.git
+
+jobs:
+  start_snapshot_build:
+    runs-on: [self-hosted, ubuntu-20.04]
+    env:
+      REMOTE_NAME: remote_repo
+      REMOTE_URL: ${{ github.event.inputs.USER_REMOTE_URL }}
+      BRANCH_NAME: snapshot_build
+    steps:
+      - name: Install Hub
+        run: |
+          cd ~
+          wget 
https://github.com/github/hub/releases/download/v2.14.2/hub-linux-amd64-2.14.2.tgz
+          tar zvxvf hub-linux-amd64-2.14.2.tgz
+          sudo ./hub-linux-amd64-2.14.2/install
+          echo "eval "$(hub alias -s)"" >> ~/.bashrc
+      - uses: actions/checkout@v3
+      - name: Set git config
+        run: |
+          git config user.name $GITHUB_ACTOR
+          git config user.email actions@"$RUNNER_NAME".local
+      - name: Create Snapshot Branch
+        run: |
+          git remote add ${REMOTE_NAME} ${REMOTE_URL}
+          git checkout -b ${BRANCH_NAME}
+          touch empty_file.txt
+          git add -A
+          git commit -m "Add empty file in order to create PR"
+          git push -f ${REMOTE_NAME}
+      - name: Create Pull Request
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: |
+          hub pull-request -F- <<<"[DO NOT MERGE]Start snapshot build for 
release process 
+          
+          
+          Run Gradle Publish"
+          
+          echo "NOTE: If there is no jenkins job started, please comment 
generated PR with: Run Gradle Publish"

Review Comment:
   ```suggestion
             echo "NOTE: If there is no GItHub Actions job started, please 
comment generated PR with: Run Gradle Publish"
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to