Skip to content

Release

Release #516

Workflow file for this run

name: Release
concurrency:
group: release-from-${{ github.ref_name }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- "main"
- "release/v[0-9][0-9].[0-9][0-9].[0-9][0-9]"
tags:
- "v[0-9][0-9].[0-9][0-9].[0-9][0-9]"
jobs:
check-event:
name: Check GH Event
runs-on: ubuntu-latest
outputs:
ok: ${{ steps.check_gh_event.outputs.ok }}
steps:
- id: check_gh_event
name: Check GH Event
shell: bash
run: |
[[ '${{ github.event_name }}' == 'workflow_dispatch' ]] || \
[[ '${{ github.event_name }}' == 'push' && '${{ github.repository }}' == 'rapidsai/devcontainers' ]] || \
[[ '${{ github.event_name }}' == 'schedule' && '${{ github.repository }}' == 'rapidsai/devcontainers' ]] || \
[[ '${{ github.event_name }}' == 'pull_request' && '${{ github.repository }}' != 'rapidsai/devcontainers' ]] \
&& echo "ok=true" | tee -a "$GITHUB_OUTPUT" \
|| echo "ok=false" | tee -a "$GITHUB_OUTPUT";
features-matrix:
name: Determine features matrix
if: needs.check-event.outputs.ok == 'true'
needs: check-event
runs-on: ubuntu-latest
outputs:
features: "${{ steps.matrix.outputs.features }}"
scenarios: "${{ steps.matrix.outputs.scenarios }}"
steps:
- name: "Checkout ${{ github.repository }}"
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Copy common scripts into features
uses: ./.github/actions/copy-common-scripts
- id: matrix
name: Determine features matrix
uses: ./.github/actions/feature-matrix
with:
full_matrix: "${{ github.event_name == 'workflow_dispatch' && 'true' || 'false' }}"
image-matrix:
name: Determine image matrix
needs: features-matrix
runs-on: ubuntu-latest
outputs:
linux: ${{ steps.matrix.outputs.linux }}
windows: ${{ steps.matrix.outputs.windows }}
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- id: matrix
name: Determine image matrix
uses: ./.github/actions/image-matrix
with:
features: "${{ needs.features-matrix.outputs.features }}"
scenarios: "${{ needs.features-matrix.outputs.scenarios }}"
full_matrix: "${{ github.event_name == 'workflow_dispatch' && 'true' || 'false' }}"
release-linux:
if: needs.image-matrix.outputs.linux != '{"include":[]}'
name: ${{ matrix.name || 'Linux' }}
needs: image-matrix
secrets: inherit
uses: ./.github/workflows/build-test-and-push-linux-image.yml
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.image-matrix.outputs.linux) }}
with:
push: true
os: "${{ matrix.os }}"
features: "${{ toJSON(matrix.features) }}"
container_env: "${{ toJSON(matrix.env) }}"
repo: "${{ vars.DOCKERHUB_REPOSITORY || github.repository }}"
release-windows:
if: needs.image-matrix.outputs.windows != '{"include":[]}'
name: ${{ matrix.name || 'Windows' }}
needs: image-matrix
secrets: inherit
uses: ./.github/workflows/build-test-and-push-windows-image.yml
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.image-matrix.outputs.windows) }}
with:
push: true
os: "${{ matrix.os }}"
features: "${{ toJSON(matrix.features) }}"
container_env: "${{ toJSON(matrix.env) }}"
repo: "${{ vars.DOCKERHUB_REPOSITORY || github.repository }}"
release-features:
if: needs.features-matrix.outputs.features != '[]' || needs.features-matrix.outputs.scenarios != '[]'
name: Features
needs: features-matrix
secrets: inherit
uses: ./.github/workflows/release-features.yml