Skip to content

Commit

Permalink
pipeline: create dev pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorisFeddema committed Aug 5, 2024
1 parent dbc89e9 commit 8a23bf0
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
on:
pull_request:
paths:
- 'charts/**'

jobs:
create-matrix:
runs-on: ubuntu-latest

outputs:
charts: ${{ steps.charts.outputs.charts }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Create changed charts matrix
id: charts
run: |
charts=$(git diff --name-only | grep ^charts/ | cut -d/ -f2 | uniq | sort | jq -R -s -c 'split("\n")[:-1]')
echo "charts=${charts}" >> "$GITHUB_OUTPUT"
build-charts:
runs-on: ubuntu-latest
needs: create-matrix

strategy:
matrix:
chart: ${{ fromJSON(needs.create-matrix.outputs.charts) }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.12.0

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push chart to GHCR
run: |
echo "Pushing chart ${{ matrix.chart }}"
# helm push "${{ matrix.chart }}" "oci://ghcr.io/${{ github.repository }}"

2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:

- name: Run chart-releaser
uses: helm/[email protected]
with:
skip_existing: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
1 change: 1 addition & 0 deletions charts/home-assistant/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
apiVersion: v2
name: home-assistant
version: 1.0.2
a
2 changes: 2 additions & 0 deletions charts/infro/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
apiVersion: v2
name: infro
version: 1.0.6

a

0 comments on commit 8a23bf0

Please sign in to comment.