Skip to content

Commit

Permalink
[FLINK-27075][ci] Adds configuration for nightly workflow runs
Browse files Browse the repository at this point in the history
  • Loading branch information
XComp committed Dec 14, 2023
1 parent 738e668 commit 3a2b282
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/flink-nightly-most-recent-released-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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.

# The nightly run workflow runs on the most-recently created release branch
# A separate workflow configuration was necessary (in contrast to using GitHub's
# matrix strategy) because three layers of composite workflows are not well visualized
# in GitHub Action.

name: "Nightly (most-recent release)"

on:
schedule:
- cron: '0 17 * * *'
workflow_dispatch:

permissions: read-all

jobs:
determine-branch:
name: "Select most-recent release branch"
runs-on: "ubuntu-latest"
outputs:
branch: ${{ steps.branch-selection.outputs.branch }}
steps:
- name: "Flink Checkout"
uses: actions/checkout@v3
with:
persist-credentials: false
- name: "Select most-recent release branch"
id: branch-selection
run: |
# actions/checkout only fetches one branch but we need all the branch information from origin
git fetch --no-tags --depth=1 origin
# filters the release branches and sorts by version
selected_branch="$(git branch --remotes | grep -o "release-[0-9]\{1,\}\.[0-9]\{1,\}" | sort -u -t'.' -k2,2V | tail -1)"
echo "Most-recently created release branch: ${selected_branch}"
echo "branch=${selected_branch}" >> "$GITHUB_OUTPUT"
nightly:
name: "Nightly ${{ needs.determine-branch.outputs.branch }}"
needs: determine-branch
uses: ./.github/workflows/flink-ci-extended.yml
with:
branch: ${{ needs.determine-branch.outputs.branch }}
supported-jdk-versions: "11 17"
secrets:
s3_bucket: ${{ secrets.IT_CASE_S3_BUCKET }}
s3_access_key: ${{ secrets.IT_CASE_S3_ACCESS_KEY }}
s3_secret_key: ${{ secrets.IT_CASE_S3_SECRET_KEY }}

0 comments on commit 3a2b282

Please sign in to comment.