Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] use existing action to rotate milestone #20670

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -675,4 +675,36 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ steps.github_tag.outputs.tag }}
rotate-milestone:
# This job updates the "next release" milestone
# to the latest released version and creates a new milestone
# named "next release" in its place
runs-on: ubuntu-latest
needs: [publish-stable]
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'open-telemetry/opentelemetry-collector-contrib'
steps:
- uses: actions/github-script@v6
with:
script: |
const milestones = await github.rest.issues.listMilestones({
owner: context.repo.owner,
repo: context.repo.repo,
state: "open"
})
for (const milestone of milestones.data) {
if (milestone.title == "next release") {
await github.rest.issues.updateMilestone({
owner: context.repo.owner,
repo: context.repo.repo,
milestone_number: milestone.number,
title: "${{ steps.github_tag.outputs.tag }}"
});
await github.rest.issues.createMilestone({
owner: context.repo.owner,
repo: context.repo.repo,
title: "next release"
});
return
}
}

38 changes: 0 additions & 38 deletions .github/workflows/milestone-rotate.yml

This file was deleted.