chore(release): Update versions to 0.2.3-rc1 #97
This file contains hidden or 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: Update Buildpack and Run Image Versions | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: New release version (e.g. 0.46.0) | |
| type: string | |
| required: true | |
| pull_request: | |
| types: [closed] | |
| jobs: | |
| validate-tag: | |
| if: github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| repo_lower: ${{ steps.lowercase_repo.outputs.REPO }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check if tag exists | |
| run: | | |
| if git tag -l | grep -q "^${{ github.event.inputs.version }}$"; then | |
| echo "Error: Tag ${{ github.event.inputs.version }} already exists" | |
| exit 1 | |
| else | |
| echo "Tag ${{ github.event.inputs.version }} does not exist - proceeding" | |
| fi | |
| - name: lowercase REPO | |
| id: lowercase_repo | |
| run: | | |
| echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_OUTPUT}" | |
| build-and-push-build-run-images: | |
| if: github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| needs: validate-tag | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| tool-cache: true | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver: docker-container | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push run-image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./run-image | |
| file: ./run-image/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| target: run | |
| push: true | |
| tags: ghcr.io/${{ needs.validate-tag.outputs.repo_lower }}/run-image:${{ github.event.inputs.version }} | |
| labels: | | |
| io.buildpacks.base.distro.name=ubuntu | |
| io.buildpacks.base.distro.version=24.04 | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build and push cuda run-image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./run-image | |
| file: ./run-image/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: base_image=nvcr.io/nvidia/cuda-dl-base:25.10-cuda13.0-devel-ubuntu24.04 | |
| target: run | |
| push: true | |
| tags: ghcr.io/${{ needs.validate-tag.outputs.repo_lower }}/cuda-run-image:${{ github.event.inputs.version }} | |
| labels: | | |
| io.buildpacks.base.distro.name=ubuntu | |
| io.buildpacks.base.distro.version=24.04 | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build and push cuda build-image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./run-image | |
| file: ./run-image/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: base_image=nvcr.io/nvidia/cuda-dl-base:25.10-cuda13.0-devel-ubuntu24.04 | |
| target: build | |
| push: true | |
| tags: ghcr.io/${{ needs.validate-tag.outputs.repo_lower }}/cuda-build-image:${{ github.event.inputs.version }} | |
| labels: | | |
| io.buildpacks.base.distro.name=ubuntu | |
| io.buildpacks.base.distro.version=24.04 | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| create-version-update-pr: | |
| if: github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| needs: [validate-tag, build-and-push-build-run-images] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update buildpack.toml versions | |
| run: make update-buildpack-versions RELEASE_VERSION=${{ github.event.inputs.version }} | |
| - name: Update builder.toml | |
| run: make update-builder-versions RELEASE_VERSION=${{ github.event.inputs.version }} | |
| - name: update build-image action | |
| run: make update-action-versions RELEASE_VERSION=${{ github.event.inputs.version }} | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.RENKUBOT_GITHUB_TOKEN }} | |
| commit-message: "chore(release): Update buildpack and run-image versions to ${{ github.event.inputs.version }}" | |
| title: "chore(release): Update versions to ${{ github.event.inputs.version }}" | |
| body: | | |
| Automated version update for release ${{ github.event.inputs.version }} | |
| - Updated buildpack.toml versions | |
| - Updated builder.toml versions | |
| This PR was created automatically by the release workflow. | |
| **Please review and merge to complete the release process.** | |
| branch: update-versions-${{ github.event.inputs.version }} | |
| base: main | |
| delete-branch: true | |
| release: | |
| if: github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'update-versions-') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Extract version from branch name | |
| id: extract_version | |
| run: | | |
| VERSION=${GITHUB_HEAD_REF#update-versions-} | |
| echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Move tag to merged commit | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag -f ${{ steps.extract_version.outputs.VERSION }} | |
| git push origin ${{ steps.extract_version.outputs.VERSION }} --force --tags | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: buildpacks/github-actions/setup-pack@v5.9.7 | |
| with: | |
| pack-version: "0.39.0" | |
| - name: publish buildpacks | |
| run: make publish_buildpacks | |
| - name: publish builders | |
| run: make publish_builders | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ steps.extract_version.outputs.VERSION }} | |
| name: Release ${{ steps.extract_version.outputs.VERSION }} | |
| generateReleaseNotes: true | |
| draft: false | |
| prerelease: false | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Cleanup branch | |
| run: | | |
| git push origin --delete update-versions-${{ steps.extract_version.outputs.VERSION }} |