Skip to content

Commit

Permalink
CI: push to OCI registries
Browse files Browse the repository at this point in the history
  • Loading branch information
omidasadpour committed Jul 18, 2023
1 parent f86c5ce commit 951adc6
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -19,6 +22,24 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
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
Expand All @@ -27,3 +48,12 @@ jobs:
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Push Helm Chart to OCI Registries
run: |
REPO_OWNER=`echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]'`
# Get packed chart file name
PKG_NAME=`ls .cr-release-packages/*.tgz`
# pushing chart to OCI registries
helm push ${PKG_NAME} oci://registry-1.docker.io/cartesi
helm push ${PKG_NAME} oci://ghcr.io/${REPO_OWNER}/charts

0 comments on commit 951adc6

Please sign in to comment.