[wip] support for custom service name (and disabling) #28
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: helm oras-operator | |
on: | |
pull_request: [] | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Prepare chart | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ^1.19 | |
- name: GHCR Login | |
if: (github.event_name != 'pull_request') | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Helm | |
run: | | |
export HELM_EXPERIMENTAL_OCI=1 | |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash | |
- name: Build chart | |
run: make helm | |
- name: Login to Helm | |
if: (github.event_name != 'pull_request') | |
env: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
echo "${password}" | helm registry login -u ${username} --password-stdin ${registry} | |
PKG_RESPONSE=$(helm package ./chart) | |
echo "$PKG_RESPONSE" | |
CHART_TAR_GZ=$(basename "$PKG_RESPONSE") | |
helm push "$CHART_TAR_GZ" oci://ghcr.io/converged-computing/oras-operator-helm |