ci: allow concurrency in publish jobs (#18) #3
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-tx-submit-api-helm-chart | |
on: | |
push: | |
branches: ['main'] | |
paths: ['charts/tx-submit-api-/**','.github/workflows/publish-tx-submit-api-helm-chart.yml'] | |
jobs: | |
build-and-push-tx-submit-api-helm-chart: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Helm | |
uses: azure/setup-helm@v3 | |
- name: Package and upload chart | |
shell: bash | |
env: | |
REGISTRY: "ghcr.io" | |
REPOSITORY: "${{ github.repository }}" | |
TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
USER: "${{ github.repository_owner }}" | |
run: | | |
rm -rf dist | |
mkdir dist | |
helm package charts/tx-submit-api/ -d dist/ | |
echo "${TOKEN}" | helm registry login "${REGISTRY}/${REPOSITORY,,}" -u "${USER}" --password-stdin | |
for file in dist/*; do | |
helm push "$file" "oci://${REGISTRY}/${REPOSITORY,,}/charts" | |
done |