Skip to content
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
3 changes: 3 additions & 0 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ jobs:
# include date in the pr branch name to ensure duplicate branches to not get created.
PR_BRANCH_NAME: 'release-v${{steps.release_version.outputs.OUTPUT}}-${{ steps.release_version.outputs.DATE }}'
PR_TITLE: 'Release MongoDB Kubernetes Operator v${{ steps.release_version.outputs.OUTPUT }}'

# Note: sonar github is a repo scoped token, which allows this action to trigger other actions.
GITHUB_TOKEN: ${{ secrets.SONAR_GITHUB_TOKEN }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by default, when using the default GITHUB_TOKEN, this does not trigger any other actions, in this case we want the PR created to kickoff the release process.

22 changes: 22 additions & 0 deletions .github/workflows/release-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,25 @@ jobs:
bodyFile: "${{ github.workspace }}/docs/RELEASE_NOTES.md"
draft: true
token: ${{ secrets.GITHUB_TOKEN }}

comment:
runs-on: ubuntu-latest
needs: [merge-release-pr-and-draft-github-release]
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Determine Release Version
id: release_version
run: |
VERSION=$(jq -r '."mongodb-kubernetes-operator"' < $GITHUB_WORKSPACE/release.json)
echo "::set-output name=version::${VERSION}"
- uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Review and publish the release here: https://github.com/mongodb/mongodb-kubernetes-operator/releases/tag/v${{ steps.release_version.outputs.version }}'
})