Skip to content

Update cluster ToC forgot to add two in the past, added today's post, and also updated expected posts for the autoscaling #172

Update cluster ToC forgot to add two in the past, added today's post, and also updated expected posts for the autoscaling

Update cluster ToC forgot to add two in the past, added today's post, and also updated expected posts for the autoscaling #172

name: Set Milestone
on:
pull_request:
types:
- assigned
- opened
- synchronize
- reopened
- edited
- ready_for_review
- review_requested
jobs:
set-milestone:
runs-on: ubuntu-latest
if: github.event.pull_request.milestone == null
steps:
- uses: actions/checkout@v4
- name: 'Get Previous tag'
id: previousgittag
continue-on-error: true
uses: "WyriHaximus/github-action-get-previous-tag@master"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- run: |
if [ $(echo ${GITTAG} | wc -c) -eq 1 ] ; then
printf "Falling back to r1 as \"%s\" is unexpectedly empty\r\n" "${GITTAG}"
printf "::set-output name=tag::%s" "r1"
exit 0
fi
printf "Using \"%s\"\r\n" "${GITTAG}"
printf "::set-output name=tag::%s" "${GITTAG}"
name: Fall back to r1 if we haven't tagged anything yet
id: previoustag
env:
GITTAG: ${{ steps.previousgittag.outputs.tag }}
- name: 'Get next versions'
id: releaseversions
uses: "WyriHaximus/github-action-next-release-version@master"
with:
version: ${{ steps.previoustag.outputs.tag }}
- name: 'Get Milestones'
uses: "WyriHaximus/github-action-get-milestones@master"
id: milestones
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- run: printf "::set-output name=number::%s" $(printenv MILESTONES | jq --arg MILESTONE $(printenv MILESTONE) '.[] | select(.title == $MILESTONE) | .number')
id: querymilestone
env:
MILESTONES: ${{ steps.milestones.outputs.milestones }}
MILESTONE: ${{ steps.releaseversions.outputs.r_version }}
- name: 'Create Milestone'
if: steps.querymilestone.outputs.number == ''
id: createmilestone
uses: "WyriHaximus/github-action-create-milestone@master"
with:
title: ${{ steps.releaseversions.outputs.r_version }}
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: 'Select found or created Milestone'
id: selectmilestone
run: |
if [ $(echo ${QUERY_NUMBER} | wc -c) -eq 1 ] ; then
printf "::set-output name=number::%s" "${CREATED_NUMBER}"
exit 0
fi
printf "::set-output name=number::%s" "${QUERY_NUMBER}"
env:
CREATED_NUMBER: ${{ steps.createmilestone.outputs.number }}
QUERY_NUMBER: ${{ steps.querymilestone.outputs.number }}
- name: 'Set Milestone'
uses: "WyriHaximus/github-action-set-milestone@master"
with:
issue_number: ${{ github.event.pull_request.number }}
milestone_number: ${{ steps.selectmilestone.outputs.number }}
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"