Skip to content

Commit

Permalink
Produce bundler chart OCI image in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
garryod committed Jan 8, 2024
1 parent 00292c4 commit c193b5b
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: OPA Chart
name: Helm Charts

on:
push:
Expand Down Expand Up @@ -35,15 +35,20 @@ jobs:
permissions:
contents: read
packages: write
strategy:
matrix:
chart:
- opa
- bundler
steps:
- name: Checkout source
uses: actions/checkout@v4.1.1

- name: Package Chart
run: helm package charts/opa
run: helm package charts/${{ matrix.chart }}

- name: Generate Image Name
run: echo IMAGE_REPOSITORY=oci://ghcr.io/$(echo "${{ github.repository }}-opa" | tr '[:upper:]' '[:lower:]' | tr '[_]' '[\-]') >> $GITHUB_ENV
run: echo IMAGE_REPOSITORY=oci://ghcr.io/$(echo "${{ github.repository }}-${{ matrix.chart }}" | tr '[:upper:]' '[:lower:]' | tr '[_]' '[\-]') >> $GITHUB_ENV

- name: Log in to GitHub Docker Registry
if: github.event_name != 'pull_request'
Expand All @@ -55,4 +60,4 @@ jobs:

- name: Publish Chart
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: helm push $(ls opa-*.tgz) ${{ env.IMAGE_REPOSITORY }}
run: helm push $(ls ${{ matrix.chart }}-*.tgz) ${{ env.IMAGE_REPOSITORY }}

0 comments on commit c193b5b

Please sign in to comment.