Skip to content

Commit

Permalink
Experimenting with publishing Helm charts to GitHub actions - Take 3
Browse files Browse the repository at this point in the history
  • Loading branch information
AnchorArray committed Jan 18, 2024
1 parent 9bbc890 commit a4684bf
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,11 @@ jobs:
run: |
chart=$(find . -name '*.tgz' | sort -r | head -n 1)
version=$(basename $chart | sed 's/\.tgz//')
ghcr_chart="ghcr.io/${{ github.repository_owner }}/${{ github.repository }}/$version"
echo "::set-output name=chart::$chart"
ghcr_chart="ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:$version"
echo "ghcr_chart=$ghcr_chart" >> $GITHUB_ENV
echo "::set-output name=ghcr_chart::$ghcr_chart"
- name: Publish Chart to GHCR
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
docker pull "${{ steps.chart.outputs.chart }}"
docker tag "${{ steps.chart.outputs.chart }}" "${{ steps.chart.outputs.ghcr_chart }}"
docker push "${{ steps.chart.outputs.ghcr_chart }}"
docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin < <(echo "${{ secrets.GITHUB_TOKEN }}")
helm chart push "${{ steps.chart.outputs.ghcr_chart }}"

0 comments on commit a4684bf

Please sign in to comment.