Skip to content

Commit

Permalink
Stage and push helm index where gitconfig is set (#1251)
Browse files Browse the repository at this point in the history
  • Loading branch information
rooftopcellist committed Feb 22, 2023
1 parent a3c28be commit edf01f0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/promote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,11 @@ jobs:
docker push quay.io/${{ github.repository }}:${{ github.event.release.tag_name }}
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
run: |
ansible-playbook ansible/helm-release.yml -v \
-e operator_image=quay.io/${{ github.repository }} \
-e chart_owner=${{ github.repository_owner }} \
-e tag=${{ github.event.release.tag_name }} \
-e gh_token=${{ secrets.GITHUB_TOKEN }}
-e gh_user=${{ github.actor }}
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

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;\
13 changes: 13 additions & 0 deletions ansible/helm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
register: asset_upload
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
command: |
make helm-index
Expand All @@ -45,3 +50,11 @@
CR_TOKEN: "{{ gh_token }}"
args:
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"

0 comments on commit edf01f0

Please sign in to comment.