doc: update README.md #41
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
name: Release Charts | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.11.2 | |
- name: Add dependancies | |
run: | | |
helm repo add bitnami https://charts.bitnami.com/bitnami | |
- name: Run chart-releaser | |
uses: helm/[email protected] | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Check changed version | |
id: file-changed | |
run: | | |
shopt -s nullglob | |
# Get packed chart file name | |
PKG_NAME=(.cr-release-packages/*.tgz) | |
if [ ${#PKG_NAME[@]} -gt 0 ]; then | |
echo "::set-output name=changed::true" | |
fi | |
- name: Push Helm Chart to OCI Registries | |
if: steps.file-changed.outputs.changed == 'true' | |
run: | | |
shopt -s nullglob | |
PKG_NAME=(.cr-release-packages/*.tgz) | |
helm push ${PKG_NAME} oci://docker.io/cartesi | |
helm push ${PKG_NAME} oci://ghcr.io/cartesi |