-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(chart): Changed the registry location to registry.k8s.io
Signed-off-by: Steve Hipwell <[email protected]>
- Loading branch information
1 parent
66a66b7
commit ecb5804
Showing
4 changed files
with
59 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,43 +7,66 @@ on: | |
|
||
jobs: | ||
lint-test: | ||
name: Lint & Test | ||
if: github.repository == 'kubernetes-sigs/metrics-server' | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
- name: Set-up Python | ||
uses: actions/setup-python@5ccb29d8773c3f3f653e1705f474dfaa8a06a912 # v4.4.0 | ||
with: | ||
version: 3.* | ||
python-version: "3.x" | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
- name: Set-up Helm | ||
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5 | ||
with: | ||
python-version: 3.7 | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
version: latest | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
- name: Set-up Artifact Hub CLI | ||
run: | | ||
set -euo pipefail | ||
curl -Lo /tmp/ah.tar.gz https://github.com/artifacthub/hub/releases/download/v1.11.0/ah_1.11.0_linux_amd64.tar.gz | ||
tar -xzvf /tmp/ah.tar.gz --directory /tmp | ||
mv /tmp/ah /usr/local/bin/ah | ||
chmod +x /usr/local/bin/ah | ||
rm -f /tmp/ah.tar.gz | ||
- name: Set-up chart-testing | ||
uses: helm/chart-testing-action@afea100a513515fbd68b0e72a7bb0ae34cb62aec # v2.3.1 | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
- name: Check for changes | ||
id: changes | ||
run: | | ||
changed=$(ct list-changed) | ||
if [[ -n "$changed" ]]; then | ||
echo "::set-output name=changed::true" | ||
changed="$(ct list-changed)" | ||
if [[ -n "${changed}" ]] | ||
then | ||
echo "changed=${{ toJSON(true) }}" >> $GITHUB_OUTPUT | ||
else | ||
echo "changed=${{ toJSON(false) }}" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Run chart-testing (lint) | ||
- name: Run Artifact Hub lint | ||
if: fromJSON(steps.changes.outputs.changed) | ||
run: ah lint --kind helm || exit 1 | ||
|
||
- name: Run chart-testing lint | ||
if: fromJSON(steps.changes.outputs.changed) | ||
run: ct lint --check-version-increment=false | ||
|
||
- name: Create Kind cluster | ||
uses: helm/[email protected] | ||
if: fromJSON(steps.changes.outputs.changed) | ||
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00 # v1.5.0 | ||
with: | ||
wait: 120s | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Run chart-testing (install) | ||
- name: Run chart-testing install | ||
if: fromJSON(steps.changes.outputs.changed) | ||
run: ct install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,15 @@ on: | |
|
||
jobs: | ||
release: | ||
name: Release | ||
if: github.repository == 'kubernetes-sigs/metrics-server' | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0 | ||
with: | ||
fetch-depth: 0 | ||
|
||
|
@@ -24,19 +28,18 @@ jobs: | |
- name: Get chart version | ||
id: chart_version | ||
uses: mikefarah/yq@v4.19.1 | ||
uses: mikefarah/yq@87cba2ecbeaecf860efcceb66deab46ae030ce1e # v4.30.6 | ||
with: | ||
cmd: yq eval '.version' './charts/metrics-server/Chart.yaml' | ||
|
||
- name: Get chart app version | ||
id: chart_app_version | ||
uses: mikefarah/yq@v4.19.1 | ||
uses: mikefarah/yq@87cba2ecbeaecf860efcceb66deab46ae030ce1e # v4.30.6 | ||
with: | ||
cmd: yq eval '.appVersion' './charts/metrics-server/Chart.yaml' | ||
|
||
- name: Check can release | ||
id: check_can_release | ||
shell: bash | ||
run: | | ||
set -euo pipefail | ||
|
@@ -50,36 +53,22 @@ jobs: | |
if [[ -z "${chart_version_match}" ]] || [[ -z "${app_version_match}" ]] | ||
then | ||
echo "::set-output name=continue::${{ toJSON(false) }}" | ||
echo "continue=${{ toJSON(false) }}" >> $GITHUB_OUTPUT | ||
else | ||
echo "::set-output name=continue::${{ toJSON(true) }}" | ||
echo "continue=${{ toJSON(true) }}" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Install Helm | ||
- name: Set-up Helm | ||
if: fromJSON(steps.check_can_release.outputs.continue) | ||
uses: azure/setup-helm@v1 | ||
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5 | ||
with: | ||
version: 3.* | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
version: latest | ||
|
||
- name: Run chart-releaser | ||
if: fromJSON(steps.check_can_release.outputs.continue) | ||
uses: helm/chart-releaser-action@v1.3.0 | ||
uses: helm/chart-releaser-action@be16258da8010256c6e82849661221415f031968 # v1.5.0 | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
CR_RELEASE_NAME_TEMPLATE: "metrics-server-helm-chart-{{ .Version }}" | ||
|
||
- uses: robinraju/[email protected] | ||
if: fromJSON(steps.check_can_release.outputs.continue) | ||
with: | ||
repository: "kubernetes-sigs/metrics-server" | ||
tag: "v${{ steps.chart_app_version.outputs.result }}" | ||
fileName: "*" | ||
|
||
- name: Update release | ||
if: fromJSON(steps.check_can_release.outputs.continue) | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: "metrics-server-helm-chart-${{ steps.chart_version.outputs.result }}" | ||
allowUpdates: true | ||
artifacts: "components.yaml,high-availability.yaml" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
CR_MAKE_RELEASE_LATEST: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters