milestone-spring-releasetrain.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. name: Check Milestone
  2. on:
  3. milestone:
  4. types: [created, opened, edited]
  5. env:
  6. DUE_ON: ${{ github.event.milestone.due_on }}
  7. TITLE: ${{ github.event.milestone.title }}
  8. permissions:
  9. contents: read
  10. jobs:
  11. spring-releasetrain-checks:
  12. name: Check DueOn is on a Release Date
  13. runs-on: ubuntu-latest
  14. if: ${{ github.repository == 'spring-projects/spring-security' }}
  15. permissions:
  16. contents: none
  17. steps:
  18. - name: Print Milestone Being Checked
  19. run: echo "Validating DueOn '$DUE_ON' for milestone '$TITLE'"
  20. - name: Validate DueOn
  21. if: env.DUE_ON != ''
  22. run: |
  23. export TOOL_VERSION=0.1.1
  24. wget "https://repo.maven.apache.org/maven2/io/spring/releasetrain/spring-release-train-tools/$TOOL_VERSION/spring-release-train-tools-$TOOL_VERSION.jar"
  25. java -cp "spring-release-train-tools-$TOOL_VERSION.jar" io.spring.releasetrain.CheckMilestoneDueOnMain --dueOn "$DUE_ON" --expectedDayOfWeek MONDAY --expectedMondayCount 3
  26. send-notification:
  27. name: Send Notification
  28. needs: [ spring-releasetrain-checks ]
  29. if: ${{ failure() || cancelled() }}
  30. runs-on: ubuntu-latest
  31. steps:
  32. - name: Send Notification
  33. uses: spring-io/spring-security-release-tools/.github/actions/send-notification@v1
  34. with:
  35. webhook-url: ${{ secrets.SPRING_SECURITY_CI_GCHAT_WEBHOOK_URL }}