Skip to content

Commit 184ce4c

Browse files
committed
fix(actions/flux-localhost-build): update or create
1 parent 6d7c981 commit 184ce4c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/flux-localhost-build.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ jobs:
7070
flux pull artifact oci://ghcr.io/fluxcd/flux-manifests:v${{ env.FLUX_VERSION }} --output /tmp/flux/
7171
flux build kustomization zzz-flux --path /tmp/flux --kustomization-file ./kube/clusters/biohazard/flux/flux-install-localhost.yaml --dry-run | tee ./${{ env.OUTFILE }}
7272
73-
7473
# below is yoinked from https://gist.github.com/swinton/03e84635b45c78353b1f71e41007fc7c
7574
- name: Commit Changes # with commit signing
7675
shell: bash
@@ -89,5 +88,10 @@ jobs:
8988
--field encoding="base64" \
9089
--field branch="${{ env.DESTINATION_BRANCH }}" \
9190
--field sha="${SHA}" \
91+
|| gh api --method PUT /repos/:owner/:repo/contents/${{ env.FILE_TO_COMMIT }} \
92+
--field message="${MESSAGE}" \
93+
--field content="${CONTENT}" \
94+
--field encoding="base64" \
95+
--field branch="${{ env.DESTINATION_BRANCH }}" \
9296
|| echo "No changes to push or errored pushing."
93-
gh pr create --base main --head ${{ env.BRANCH }} --title "${{ env.MESSAGE }}" --body "Updates Flux install manifests, patched for use with localhost hostNetwork, to the ${{ env.FLUX_VERSION }} version." --reviewer ${{ github.repository_owner }}
97+
gh pr create --base main --head ${{ env.BRANCH }} --title "${{ env.MESSAGE }}" --body "Updates Flux install manifests, patched for use with localhost hostNetwork, to the ${{ env.FLUX_VERSION }} version." --reviewer ${{ github.repository_owner }}

0 commit comments

Comments
 (0)