Stage and push helm index where gitconfig is set (#1251)

This commit is contained in:
Christian Adams
2023-02-22 14:09:35 -05:00
committed by GitHub
parent a3c28be98a
commit edf01f009e
3 changed files with 14 additions and 11 deletions

View File

@@ -33,11 +33,6 @@ jobs:
docker push quay.io/${{ github.repository }}:${{ github.event.release.tag_name }} docker push quay.io/${{ github.repository }}:${{ github.event.release.tag_name }}
docker push quay.io/${{ github.repository }}:latest docker push quay.io/${{ github.repository }}:latest
- name: Configure git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Release Helm chart - name: Release Helm chart
run: | run: |
ansible-playbook ansible/helm-release.yml -v \ ansible-playbook ansible/helm-release.yml -v \
@@ -45,3 +40,4 @@ jobs:
-e chart_owner=${{ github.repository_owner }} \ -e chart_owner=${{ github.repository_owner }} \
-e tag=${{ github.event.release.tag_name }} \ -e tag=${{ github.event.release.tag_name }} \
-e gh_token=${{ secrets.GITHUB_TOKEN }} -e gh_token=${{ secrets.GITHUB_TOKEN }}
-e gh_user=${{ github.actor }}

View File

@@ -395,9 +395,3 @@ helm-index:
$(HELM) repo index .cr-release-packages --url https://github.com/$(CHART_OWNER)/$(CHART_REPO)/releases/download/ --merge gh-pages/index.yaml $(HELM) repo index .cr-release-packages --url https://github.com/$(CHART_OWNER)/$(CHART_REPO)/releases/download/ --merge gh-pages/index.yaml
mv .cr-release-packages/index.yaml gh-pages/index.yaml mv .cr-release-packages/index.yaml gh-pages/index.yaml
@echo "== PUSH INDEX FILE =="
cd gh-pages;\
git add index.yaml;\
git commit -m "Updated index.yaml latest release";\
git push;\

View File

@@ -37,6 +37,11 @@
register: asset_upload register: asset_upload
changed_when: asset_upload.json.state == "uploaded" changed_when: asset_upload.json.state == "uploaded"
- name: Configure git config
run: |
git config user.name "{{ gh_user }}"
git config user.email "{{ gh_user }}@users.noreply.github.com"
- name: Publish helm index - name: Publish helm index
command: | command: |
make helm-index make helm-index
@@ -45,3 +50,11 @@
CR_TOKEN: "{{ gh_token }}" CR_TOKEN: "{{ gh_token }}"
args: args:
chdir: "{{ playbook_dir }}/../" chdir: "{{ playbook_dir }}/../"
- name: Stage and Push commit to gh-pages branch
command: |
git add index.yaml
git commit -m "Updated index.yaml latest release"
git push
args:
chdir: "{{ playbook_dir }}/../gh-pages"