Merge pull request #364 from kubewharf/dependabot/go_modules/go.etcd.… #251
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish helm chart | |
on: | |
push: | |
tags: "*" | |
branches: ["main"] | |
jobs: | |
publish-scan: | |
name: Build scan image | |
runs-on: [ubuntu-20.04] | |
if: ${{ github.ref_type == 'tag' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Docker login for ghcr | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{github.actor}} | |
password: ${{secrets.GITHUB_TOKEN}} | |
- name: Set image tag for release | |
id: tag-name | |
run: echo "IMAGE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
- run: docker build -t ghcr.io/kubewharf/kelemetry-scan:${{steps.tag-name.outputs.IMAGE_TAG}} scan | |
- run: docker push ghcr.io/kubewharf/kelemetry-scan:${{steps.tag-name.outputs.IMAGE_TAG}} | |
publish-chart: | |
name: Build helm chart | |
runs-on: [ubuntu-20.04] | |
if: ${{ github.ref_type == 'tag' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Docker login for ghcr | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{github.actor}} | |
password: ${{secrets.GITHUB_TOKEN}} | |
- name: Set image tag for release | |
id: tag-name | |
run: echo "IMAGE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
- run: helm package charts/kelemetry --app-version="${{steps.tag-name.outputs.IMAGE_TAG}}" --version="${{steps.tag-name.outputs.IMAGE_TAG}}" -d output | |
- run: helm push output/kelemetry-chart-${{steps.tag-name.outputs.IMAGE_TAG}}.tgz oci://ghcr.io/kubewharf |