mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-08-23 22:26:49 +00:00
Bumps the github-actions group with 4 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [ossf/scorecard-action](https://github.com/ossf/scorecard-action), [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) and [actions/stale](https://github.com/actions/stale). Updates `actions/checkout` from 7.0.0 to 7.0.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0...3d3c42e5aac5ba805825da76410c181273ba90b1) Updates `ossf/scorecard-action` from 2.4.3 to 2.4.4 - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](https://github.com/ossf/scorecard-action/compare/4eaacf0543bb3f2c246792bd56e8cdeffafb205a...2d1146689b8cda280b9bc96326124645441f03bc) Updates `github/codeql-action/upload-sarif` from 4.37.1 to 4.37.4 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/7188fc363630916deb702c7fdcf4e481b751f97a...f205ea1c3313d32999d8d6a48b4f6530d4437b38) Updates `actions/stale` from 10.4.0 to 11.0.0 - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/1e223db275d687790206a7acac4d1a11bd6fe629...4391f3da665fdf50b6810c1a66712fb9ba21aa93) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: ossf/scorecard-action dependency-version: 2.4.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action/upload-sarif dependency-version: 4.37.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/stale dependency-version: 11.0.0 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.9 KiB
YAML
85 lines
2.9 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
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@3a2844b7e9c422d3c10d287c895573f7108da1b3 # 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@3a2844b7e9c422d3c10d287c895573f7108da1b3 # 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);
|
|
}
|