mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-16 22:27:34 +00:00
Bumps the github-actions group with 4 updates: [actions/github-script](https://github.com/actions/github-script), [step-security/harden-runner](https://github.com/step-security/harden-runner), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [softprops/action-gh-release](https://github.com/softprops/action-gh-release). Updates `actions/github-script` from 8 to 9 - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v8...v9) Updates `step-security/harden-runner` from 2.16.1 to 2.17.0 - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](fe10465874...f808768d15) Updates `actions/upload-artifact` from 7.0.0 to 7.0.1 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](bbbca2ddaa...043fb46d1a) Updates `softprops/action-gh-release` from 2 to 3 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '9' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: step-security/harden-runner dependency-version: 2.17.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/upload-artifact dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: softprops/action-gh-release dependency-version: '3' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
85 lines
2.8 KiB
YAML
85 lines
2.8 KiB
YAML
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@v6.0.2
|
|
with:
|
|
fetch-depth: 1
|
|
path: go/src/open-cluster-management.io/ocm
|
|
- name: get release version
|
|
run: |
|
|
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
- name: get major release version
|
|
run: |
|
|
echo "MAJOR_RELEASE_VERSION=${RELEASE_VERSION%.*}" >> $GITHUB_ENV
|
|
echo "TRIMMED_RELEASE_VERSION=${RELEASE_VERSION#v}" >> $GITHUB_ENV
|
|
outputs:
|
|
MAJOR_RELEASE_VERSION: ${{ env.MAJOR_RELEASE_VERSION }}
|
|
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
|
|
TRIMMED_RELEASE_VERSION: ${{ env.TRIMMED_RELEASE_VERSION }}
|
|
upload:
|
|
name: upload
|
|
runs-on: ubuntu-latest
|
|
needs: [ env ]
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: submit cluster-manager chart to OCM chart repo
|
|
if: github.event_name != 'pull_request'
|
|
uses: actions/github-script@v9
|
|
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 }}",
|
|
"chart-name": "cluster-manager",
|
|
},
|
|
})
|
|
console.log(result);
|
|
} catch(error) {
|
|
console.error(error);
|
|
core.setFailed(error);
|
|
}
|
|
- name: submit klusterlet chart to OCM chart repo
|
|
if: github.event_name != 'pull_request'
|
|
uses: actions/github-script@v9
|
|
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 }}",
|
|
"chart-name": "klusterlet",
|
|
},
|
|
})
|
|
console.log(result);
|
|
} catch(error) {
|
|
console.error(error);
|
|
core.setFailed(error);
|
|
}
|