Release 2.0.0-beta #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate nightly patch release(s) | |
#on: | |
# # Run every night at 5:15PM PST | |
# # Run before monthly, so we don't immediately patch a new minor version | |
# schedule: | |
# - cron: '0 15 17 ? * *' | |
jobs: | |
generate-version-matrix: | |
name: Generate-matrix | |
runs-on: ubuntu-latest | |
if: github.repository == 'aws/sagemaker-distribution' | |
outputs: | |
matrix: ${{ steps.gen-mat.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate patch version matrix | |
id: gen-mat | |
# Output looks like :matrix={"version":["0.0.2","0.1.2",..."1.4.1"]} | |
# For each minor, get highest patch version. Use each patch | |
# as base version. Use this patch as base version. | |
run: | | |
versions=("{\"version\":[") | |
for minor in build_artifacts/v2/*; do | |
minor_version="${minor##*/}" | |
highest_patch=$(ls $minor | sort -t. -k3,3n | tail -n1) | |
versions+="\"${highest_patch#v}\"" | |
versions+="," | |
done | |
versions=${versions::-1} | |
versions+="]}" | |
echo "matrix=$versions" >> $GITHUB_OUTPUT | |
start-nightly-patch: | |
name: Start nightly patch release | |
needs: generate-version-matrix | |
permissions: | |
pull-requests: write | |
contents: write | |
id-token: write | |
strategy: | |
matrix: ${{ fromJson(needs.generate-version-matrix.outputs.matrix) }} | |
fail-fast: false | |
uses: aws/sagemaker-distribution/.github/workflows/nightly-build-image.yml@main | |
with: | |
release-type: "patch" | |
base-version: ${{ matrix.version }} |