volcano.sh/volcano@v1.9.0/.github/workflows/release_chart.yaml (about)

     1  name: Release Charts
     2  
     3  on:
     4    push:
     5      tags:
     6        - "v*.*.*"
     7  
     8  jobs:
     9    release-charts:
    10      runs-on: ubuntu-latest
    11      steps:
    12        - name: Checkout
    13          uses: actions/checkout@v3
    14          with:
    15            repository: "${{ github.repository_owner }}/volcano"
    16            path: "volcano"
    17            fetch-depth: 0
    18  
    19        - name: Checkout helm-charts
    20          uses: actions/checkout@v3
    21          with:
    22            repository: "${{ github.repository_owner }}/helm-charts"
    23            # use token for helm-charts repo
    24            token: "${{ secrets.HELM_CHARTER_TOKEN }}"
    25            path: "helm-charts"
    26            fetch-depth: 0
    27  
    28        - name: Get chart version
    29          run: |
    30            echo "chart_version=$(echo ${GITHUB_REF##*/v})" >> $GITHUB_ENV
    31        
    32        - name: Make charts
    33          shell: bash
    34          working-directory: volcano
    35          run: |
    36            TAG=${{ env.chart_version }} make generate-charts
    37        
    38        - name: Install chart-releaser
    39          uses: helm/chart-releaser-action@v1.5.0
    40          with:
    41            install_only: true
    42  
    43        # upload charts to helm-charts repos's release
    44        - name: Upload charts
    45          shell: bash
    46          working-directory: volcano
    47          run: |
    48            cr upload -o ${{ github.repository_owner }}
    49          env:
    50            # GitHub repository
    51            CR_GIT_REPO: "helm-charts"
    52            # Path to directory with chart packages (default ".cr-release-packages")
    53            CR_PACKAGE_PATH: "_output/release/chart/"
    54            # use token for helm-charts repo
    55            CR_TOKEN: "${{ secrets.HELM_CHARTER_TOKEN }}"
    56  
    57        # copy artifacts to helm-charts repo, we need those for update index
    58        - name: Copy artifacts
    59          run: |
    60            cp -r volcano/_output/ helm-charts/
    61  
    62        - name: Configure Git
    63          working-directory: helm-charts
    64          run: |
    65            git config user.name "$GITHUB_ACTOR"
    66            git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
    67  
    68        # this step will directly push to the main branch, so make sure you have the right permissions
    69        - name: Update index
    70          working-directory: helm-charts
    71          run: |
    72            rm -rf index.yaml
    73            rm -rf .cr-index
    74            mkdir -p .cr-index
    75            cr index -o ${{ github.repository_owner }} --push
    76          env:
    77            # GitHub repository
    78            CR_GIT_REPO: "helm-charts"
    79            # The GitHub pages branch (default "gh-pages")
    80            CR_PAGES_BRANCH: "main"
    81            # Path to directory with chart packages (default ".cr-release-packages")
    82            CR_PACKAGE_PATH: "_output/release/chart/"
    83            # use token for helm-charts repo
    84            CR_TOKEN: "${{ secrets.HELM_CHARTER_TOKEN }}"