Use both current and legacy component name to filter out DevFlags #201
Workflow file for this run
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: "Push tags and create version update prs" | |
on: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
push-tags-and-create-release-prs: | |
if: github.event_name == 'pull_request' && github.event.pull_request.merged == false && github.event.action == 'closed' && contains(github.event.pull_request.title, '[DO NOT MERGE] Test') | |
runs-on: ubuntu-latest | |
steps: | |
- name: check release comment | |
uses: peter-evans/find-comment@v3 | |
id: dry-run-comment | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-includes: /release-odh | |
direction: last | |
- name: "Evaluate release comment" | |
run: | | |
if [ "${{ steps.dry-run-comment.outputs.comment-body }}" != "/release-odh" ]; then | |
echo "Please add /release-odh comment while closing the pr" | |
exit 1 | |
fi | |
shell: bash | |
- name: Get release data from comment | |
uses: peter-evans/find-comment@v3 | |
id: release-data | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-includes: "#Release#" | |
- name: Set version/tracker-url in env | |
run: | | |
echo "VERSION=$(echo "${{ steps.release-data.outputs.comment-body }}" | awk -F= '$1 ~ /version$/{print $2}')" >> $GITHUB_ENV | |
echo "TRACKER_URL=$(echo "${{ steps.release-data.outputs.comment-body }}" | awk -F= '$1 ~ /tracker-url$/{print $2}')" >> $GITHUB_ENV | |
- name: Push version tag to quay.io | |
run: | | |
skopeo login -u ${{ secrets.QUAY_ID }} -p ${{ secrets.QUAY_TOKEN }} quay.io | |
skopeo copy docker://quay.io/${{ secrets.QUAY_ORG }}/opendatahub-operator:pr-${{ github.event.pull_request.number }} docker://quay.io/${{ secrets.QUAY_ORG }}/opendatahub-operator:v${{ env.VERSION }} | |
echo "Successfully updated tag to quay.io with version: v${{ env.VERSION }}" | |
- uses: actions/checkout@v4 | |
- name: Create version update pr in incubation | |
uses: ./.github/actions/update-release-version | |
with: | |
version: ${{ env.VERSION }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "Update version to ${{ env.VERSION }}" | |
title: "Update version to ${{ env.VERSION }}" | |
branch-name: "odh-release/version-update" | |
base-branch: incubation | |
- name: Create release branch | |
run: | | |
git fetch origin incubation:incubation | |
git checkout incubation | |
git checkout -b odh-${{ env.VERSION }} | |
git push -f origin odh-${{ env.VERSION }} | |
- uses: ./.github/actions/update-manifest-branches | |
- name: Create release pr in release branch | |
uses: ./.github/actions/update-release-version | |
id: cpr-release-pr | |
with: | |
version: ${{ env.VERSION }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "ODH Release ${{ env.VERSION }}" | |
title: "ODH Release ${{ env.VERSION }}: Version Update" | |
branch-name: "odh-release/release-branch-update" | |
base-branch: odh-${{ env.VERSION }} | |
- name: Comment version and tracker url in the pr | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: | | |
#Release# | |
version=${{ env.VERSION }} | |
tracker-url=${{ env.TRACKER_URL }} | |
:exclamation: DO NOT EDIT THIS COMMENT :exclamation: | |
pr_number: ${{ steps.cpr-release-pr.outputs.pull-request-number }} | |