-
Notifications
You must be signed in to change notification settings - Fork 154
OCI chart release #256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
OCI chart release #256
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
cb128a2
feat: truncate/cleanup chart.version
joryirving 51f46ab
feat: update release to push OCI image
joryirving 2a4b8f6
fix: pivot to using chart-releaser
joryirving 65f94e0
fix: update chart.Version references
joryirving 4907271
chore: bump relevant chart versions
joryirving 94d6aa5
chore: bump actions in lint
joryirving f01ee87
chore: update command based on docs
joryirving 2f6db61
fix: add if to all steps as per action repo
joryirving 8ecfb0f
fix: ditch cosign
joryirving e5f9e21
chore: remove charts from package name
joryirving c742a68
feat: cleanup permissions
joryirving File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -8,42 +8,45 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
uses: azure/setup-helm@v4 | ||
with: | ||
version: v3.4.0 | ||
version: v3.17.2 | ||
|
||
- uses: actions/setup-python@v2 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.13 | ||
|
||
- name: Set up chart-testing | ||
uses: helm/chart-testing-action@v2.0.1 | ||
uses: helm/chart-testing-action@v2.7.0 | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed) | ||
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> $GITHUB_OUTPUT | ||
echo "changed=true" >> "$GITHUB_OUTPUT" | ||
fi | ||
|
||
- name: Run chart-testing (lint) | ||
run: ct lint | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct lint --target-branch ${{ github.event.repository.default_branch }} | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
if: steps.list-changed.outputs.changed == 'true' | ||
uses: helm/[email protected] | ||
|
||
- name: Install LoadBalancer | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: |- | ||
kubectl config use-context kind-chart-testing | ||
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.10/config/manifests/metallb-native.yaml | ||
kubectl apply -f .github/metallb-configmap.yaml | ||
|
||
- name: Run chart-testing (install) | ||
run: ct install | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: ct install --target-branch ${{ github.event.repository.default_branch }} |
This file contains hidden or 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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
name: Release Charts | ||
|
||
on: | ||
|
@@ -10,12 +9,15 @@ jobs: | |
release: | ||
timeout-minutes: 5 | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Turnstyle | ||
uses: softprops/turnstyle@v1 | ||
uses: softprops/turnstyle@v2 | ||
with: | ||
continue-after-seconds: 180 | ||
env: | ||
|
@@ -28,19 +30,34 @@ jobs: | |
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
# See https://github.com/helm/chart-releaser-action/issues/6 | ||
|
||
- name: Install Helm | ||
run: | | ||
curl -fsSLo get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | ||
chmod 700 get_helm.sh | ||
./get_helm.sh | ||
uses: azure/setup-helm@v4 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Add dependency chart repos | ||
run: | | ||
helm repo add stable https://charts.helm.sh/stable | ||
helm repo update stable | ||
|
||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
with: | ||
charts_repo_url: https://itzg.github.io/minecraft-server-charts | ||
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
|
||
## https://github.com/helm/chart-releaser-action/issues/107#issuecomment-2133797963 | ||
- name: Push Charts to GHCR | ||
run: | | ||
for pkg in .cr-release-packages/*; do | ||
if [ -z "${pkg:-}" ]; then | ||
break | ||
fi | ||
|
||
helm push "${pkg}" oci://ghcr.io/${{ github.repository }} | ||
done |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This makes me realize I need dependabot enabled on this repo.