|
| 1 | +name: Post Release Job |
| 2 | +'on': |
| 3 | + schedule: |
| 4 | + - cron: '*/30 * * * *' |
| 5 | +jobs: |
| 6 | + main: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + steps: |
| 9 | + - name: Configure Git |
| 10 | + run: | |
| 11 | + git config --global user.name "infinispan-qe-bot" |
| 12 | + git config --global user.email "q*@infinispan.org" |
| 13 | + - name: Checkout |
| 14 | + uses: actions/checkout@v6 |
| 15 | + with: |
| 16 | + path: operator |
| 17 | + ref: '${{ env.REF }}' |
| 18 | + token: '${{ secrets.INFINISPAN_RELEASE_TOKEN }}' |
| 19 | + - name: Create GitHub Release |
| 20 | + uses: softprops/action-gh-release@v2 |
| 21 | + with: |
| 22 | + tag_name: '${{ env.REL_VERSION }}' |
| 23 | + env: |
| 24 | + GITHUB_TOKEN: '${{ secrets.INFINISPAN_RELEASE_TOKEN }}' |
| 25 | + - name: Set Next Version |
| 26 | + id: set_version |
| 27 | + working-directory: operator |
| 28 | + run: ./scripts/ci/bump_version.sh |
| 29 | + - name: Check if the image exists |
| 30 | + id: check_image |
| 31 | + run: >- |
| 32 | + docker manifest inspect quay.io/operatorhubio/infinispan:v${{ |
| 33 | + env.REL_VERSION }} |
| 34 | + - name: Update the version file to next version |
| 35 | + if: success() |
| 36 | + env: |
| 37 | + NEXT_VERSION: '${{ steps.set_version.outputs.new_tag }}' |
| 38 | + PREV_VERSION: '${{ steps.set_version.outputs.prev_ver }}' |
| 39 | + working-directory: operator |
| 40 | + run: > |
| 41 | + echo "$NEXT_VERSION" > version.txt |
| 42 | +
|
| 43 | + sed -i "s/export VERSION=.*/export VERSION=$NEXT_VERSION/" |
| 44 | + scripts/ci/install-catalog-source.sh |
| 45 | +
|
| 46 | + sed -i -E "s/^[[:space:]]*(for version in [^;]*)(;[[:space:]]*do)/\1 |
| 47 | + v$PREV_VERSION\2/" scripts/create-olm-catalog.sh |
| 48 | +
|
| 49 | + ./scripts/ci/add_next_version.sh scripts/test-catalog.yml |
| 50 | + infinispan-operator.v$NEXT_VERSION infinispan-operator.v$PREV_VERSION |
| 51 | +
|
| 52 | + sed -i -E "s/^( *replaces: |
| 53 | + +infinispan-operator\.v)[0-9]+\.[0-9]+\.[0-9]+/\1$PREV_VERSION/" |
| 54 | + config/manifests/bases/infinispan-operator.clusterserviceversion.yaml |
| 55 | +
|
| 56 | + sed -i -E "s/^( *replaces: |
| 57 | + +infinispan-operator\.v)[0-9]+\.[0-9]+\.[0-9]+/\1$PREV_VERSION/" |
| 58 | + release-config.yaml |
| 59 | +
|
| 60 | + sed -i -E "s/(olm.skipRange: '>=2.4.18 <)[0-9.]+/\1$NEXT_VERSION/" |
| 61 | + config/manifests/bases/infinispan-operator.clusterserviceversion.yaml |
| 62 | +
|
| 63 | + sed -i -E "s/(skipRange: '>=2.4.18 <)[0-9.]+/\1$NEXT_VERSION/" |
| 64 | + release-config.yaml |
| 65 | +
|
| 66 | + git add . |
| 67 | +
|
| 68 | + git commit -m "Next Version $NEXT_VERSION" |
| 69 | +
|
| 70 | + git push origin "${{ env.REF }}" |
| 71 | + - name: Remove scheduled job |
| 72 | + uses: cardinalby/unschedule-job-action@v1 |
| 73 | + if: success() |
| 74 | + with: |
| 75 | + ghToken: '${{ secrets.INFINISPAN_RELEASE_TOKEN }}' |
| 76 | + deleteRefTag: false |
| 77 | + env: |
| 78 | + DELAYED_JOB_CHECKOUT_REF: d99ca4c3072386a08ae8ed557cc485a4f4f8c503 |
| 79 | + DELAYED_JOB_CHECKOUT_REF_IS_TAG: 'false' |
| 80 | + DELAYED_JOB_WORKFLOW_FILE_PATH: .github/workflows/publish-main.yaml |
| 81 | + DELAYED_JOB_WORKFLOW_UNSCHEDULE_TARGET_BRANCH: main |
| 82 | + REF: main |
| 83 | + REL_VERSION: 2.5.10 |
0 commit comments