Skip to content

Commit

Permalink
updated/fixed github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
zackbradys committed Dec 15, 2023
1 parent 5964056 commit 389df1e
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,14 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Get Chart Information
id: chart_info
run: |
chart_file=$(find . -name '*.tgz' -type f)
chart_filename=${chart_file##*/}
chart_tag=${chart_filename##*-}
chart_tag=${chart_tag%.tgz}
echo ::set-output name=chart_filename::$chart_filename
echo ::set-output name=chart_tag::$chart_tag
- name: Log into GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token

- name: Push Helm Chart Release to GitHub Container Registry
run: |
docker tag ${{ steps.chart_info.outputs.chart_filename }} ghcr.io/${{ github.repository_owner }}/rancher-cluster-templates:${{ steps.chart_info.outputs.chart_tag }}
docker push ghcr.io/${{ github.repository_owner }}/rancher-cluster-templates:${{ steps.chart_info.outputs.chart_tag }}
chart_file=$(find . -name '*.tgz' -type f)
chart_filename=${chart_file##*/}
chart_tag=${chart_filename##*-}
chart_tag=${chart_tag%.tgz}
docker tag "${chart_file}" ghcr.io/${{ github.repository_owner }}/rancher-cluster-templates:${chart_tag}
docker push ghcr.io/${{ github.repository_owner }}/rancher-cluster-templates:${chart_tag}

0 comments on commit 389df1e

Please sign in to comment.