fix(actions/flux-localhost-build): force push

This commit is contained in:
JJGadgets
2024-05-20 06:42:09 +08:00
parent 3910c7c24b
commit 59294bcc64

View File

@@ -63,8 +63,9 @@ jobs:
git config user.name "${{ secrets.BOT_USERNAME }}[bot]"
git config user.email "${{ secrets.BOT_USERNAME }} <${{ secrets.BOT_API_ID }}+${{ secrets.BOT_USERNAME }}[bot]@users.noreply.github.com>" # get $BOT_API_ID from `curl -s 'https://api.github.com/users/$(BOT_USERNAME)%5Bbot%5D' | yq .id`
git checkout ${{ env.BRANCH }} || git checkout -b ${{ env.BRANCH }} main
git pull --rebase --autostash origin ${{ env.BRANCH }} || true
git checkout -b ${{ env.BRANCH }} main
#git checkout ${{ env.BRANCH }} || git checkout -b ${{ env.BRANCH }} main
#git pull --rebase --autostash origin ${{ env.BRANCH }} || true
mkdir -p /tmp/flux
flux pull artifact oci://ghcr.io/fluxcd/flux-manifests:v${{ env.FLUX_VERSION }} --output /tmp/flux/
@@ -72,5 +73,5 @@ jobs:
git add ./kube/bootstrap/flux/flux-install-localhost-manifests.yaml
git commit --message "${{ env.MESSAGE }}"
git push origin ${{ env.BRANCH }}
git push origin ${{ env.BRANCH }} --force
gh pr create --title "${{ env.MESSAGE }}" --body "Updates Flux install manifests, patched for use with localhost hostNetwork, to the ${{ env.FLUX_VERSION }} version." --reviewer ${{ github.repository_owner }}