Skip to content

fleetconfig-controller/v0.1.7 #25

fleetconfig-controller/v0.1.7

fleetconfig-controller/v0.1.7 #25

Workflow file for this run

name: ChartUpload
permissions:
contents: read
on:
release:
types: [published]
jobs:
env:
name: prepare release env
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v5
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/lab
- name: prepare release environment
id: prepare-env
uses: ./go/src/open-cluster-management.io/lab/.github/actions/prepare-release-env
with:
github_ref: ${{ github.ref }}
outputs:
MAJOR_RELEASE_VERSION: ${{ steps.prepare-env.outputs.MAJOR_RELEASE_VERSION }}
RELEASE_VERSION: ${{ steps.prepare-env.outputs.RELEASE_VERSION }}
TRIMMED_RELEASE_VERSION: ${{ steps.prepare-env.outputs.TRIMMED_RELEASE_VERSION }}
MATRIX: ${{ steps.prepare-env.outputs.MATRIX }}
upload:
name: upload
runs-on: ubuntu-latest
needs: [env]
permissions:
contents: write
strategy:
matrix: ${{ fromJson(needs.env.outputs.MATRIX) }}
steps:
- name: submit lab project chart to OCM chart repo
if: github.event_name != 'pull_request'
uses: actions/github-script@v8
with:
github-token: ${{ secrets.OCM_BOT_PAT }}
script: |
try {
const result = await github.rest.actions.createWorkflowDispatch({
owner: 'open-cluster-management-io',
repo: 'helm-charts',
workflow_id: 'download-chart.yml',
ref: 'main',
inputs: {
repo: "${{ github.repository }}",
version: "${{ needs.env.outputs.TRIMMED_RELEASE_VERSION }}",
component: "${{ matrix.repository }}",
"chart-name": "${{ matrix.repository }}",
},
})
console.log(result);
} catch(error) {
console.error(error);
core.setFailed(error);
}