Skip to content

ODH Release 2.12.0: Version Update #84

ODH Release 2.12.0: Version Update

ODH Release 2.12.0: Version Update #84

Workflow file for this run

name: "Release ODH"
on:
pull_request:
types:
- closed
jobs:
gh-release:
if: github.event.pull_request.merged && startsWith(github.event.pull_request.title, 'ODH Release') && endsWith(github.event.pull_request.title, 'Version Update')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Get release data from pr
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: "#Release#"
- name: Set version/tracker-url in env
run: |
echo "VERSION=$(echo "${{ steps.fc.outputs.comment-body }}" | grep version | cut -d "=" -f2)" >> $GITHUB_ENV
echo "TRACKER_URL=$(echo "${{ steps.fc.outputs.comment-body }}" | grep tracker-url | cut -d "=" -f2)" >> $GITHUB_ENV
- uses: fregante/setup-git-user@v2
- name: Create and push version tags
run: |
git checkout odh-${{ env.VERSION }}
git tag -a -m v${{ env.VERSION }} v${{ env.VERSION }}
git push origin v${{ env.VERSION }}
- name: Get component release notes
id: release-notes
uses: actions/github-script@v7
with:
script: |
const script = require('./.github/scripts/get-component-release-notes.js')
script({github, core})
- name: Create GH release
uses: softprops/action-gh-release@v2
with:
body: ${{ steps.release-notes.outputs.release-notes-body }}
tag_name: v${{ env.VERSION }}
generate_release_notes: true
append_body: true
make_latest: true
# create-community-operators-pr:
# needs: [gh-release]
# name: Create community operators prod pr # https://github.com/redhat-openshift-ecosystem/community-operators-prod
# runs-on: ubuntu-latest
# steps:
# - uses: tibdex/github-app-token@v1
# id: generate-token
# with:
# app_id: ${{ secrets.APP_ID }}
# private_key: ${{ secrets.APP_PRIVATE_KEY }}
# - name: Set env variables
# uses: opendatahub-io/opendatahub-operator/.github/actions/set-shared-env@incubation
# with:
# pat-token: ${{ steps.generate-token.outputs.token }}
# - name: Checkout opendatahub-operator
# uses: actions/checkout@v4
# with:
# path: ./opendatahub-operator
# ref: v${{ env.VERSION }}
# - name: Checkout redhat-openshift-ecosystem/community-operators-prod
# uses: actions/checkout@v4
# with:
# token: <PAT> # We need a token with repo rights
# repository: redhat-openshift-ecosystem/community-operators-prod # replaced with redhat-openshift-ecosystem/community-operators-prod
# path: ./community-operators-prod
# - name: Copy bundle files and add annotation
# run : |
# ls -la
# # cd community-operators-prod
# # mkdir -p community-operators-prod/operators/opendatahub-operator/${{ env.VERSION }}
# # ls -la
# # cp -a ../opendatahub-operator/bundle/. operators/opendatahub-operator/${{ env.VERSION }}/
# # echo "
# # # OpenShift specific version
# # com.redhat.openshift.versions: v4.9" >> operators/opendatahub-operator/${{ env.VERSION }}/metadata/annotations.yaml
# # sed -i -e "s|image: REPLACE_IMAGE:latest.*|image: quay.io/opendatahub/opendatahub-operator:v${{ env.VERSION }}|g" operators/opendatahub-operator/${{ env.VERSION }}/manifests/opendatahub-operator.clusterserviceversion.yaml
# # git status
# - name: Create community operators prod pr
# uses: peter-evans/create-pull-request@v6
# with:
# path: ./community-operators-prod
# token: <PAT> # We need a token with repo rights
# push-to-fork: opendatahub-io/community-operators-prod # Here we can fork community-operators-prod into opendatahub-io and use opendatahub-io/community-operators-prod. eg:https://github.com/maistra/community-operators-prod
# commit-message: ODH Release v${{ env.VERSION }}
# delete-branch: true
# title: operator opendatahub-operator (${{ env.VERSION }})