fix: push_manifests option not working

This commit is contained in:
2025-12-21 16:37:04 +01:00
parent 9798363981
commit 6f73d177c1

View File

@@ -45,12 +45,12 @@ jobs:
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Install kustomize - name: Install kustomize
if: inputs.push_manifests == true if: ${{inputs.push_manifests == true}}
run: | run: |
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
- name: Setup Flux CLI - name: Setup Flux CLI
if: inputs.push_manifests == true if: ${{inputs.push_manifests == true}}
uses: https://github.com/fluxcd/flux2/action@main uses: https://github.com/fluxcd/flux2/action@main
with: with:
version: v2.5.0 version: v2.5.0
@@ -89,13 +89,13 @@ jobs:
echo images=${IMAGES} >> $GITHUB_OUTPUT echo images=${IMAGES} >> $GITHUB_OUTPUT
- name: Kustomize manifests - name: Kustomize manifests
if: inputs.push_manifests == true if: ${{inputs.push_manifests == true}}
run: | run: |
# TODO: Fix this # TODO: Fix this
./kustomize build ./manifests | sed "s/\${DIGEST}/${{ steps.build.outputs.digest }}/" > ./manifests.yaml ./kustomize build ./manifests | sed "s/\${DIGEST}/${{ steps.build.outputs.digest }}/" > ./manifests.yaml
- name: Push manifests - name: Push manifests
if: inputs.push_manifests == true if: ${{inputs.push_manifests == true}}
run: | run: |
flux push artifact oci://${{ env.OCI_REPO }}/manifests:${{ gitea.head_ref || gitea.ref_name }} \ flux push artifact oci://${{ env.OCI_REPO }}/manifests:${{ gitea.head_ref || gitea.ref_name }} \
--path="./manifests.yaml" \ --path="./manifests.yaml" \
@@ -107,12 +107,12 @@ jobs:
$(echo "${{ steps.meta.outputs.tags }}" | sed -e 's/^.*:/--tag /') $(echo "${{ steps.meta.outputs.tags }}" | sed -e 's/^.*:/--tag /')
- name: Call webhook - name: Call webhook
if: inputs.webhook_url != '' if: ${{inputs.webhook_url != ''}}
run: | run: |
curl ${{ inputs.webhook_url }} || true curl ${{ inputs.webhook_url }} || true
- name: Notify build status - name: Notify build status
if: failure() if: ${{failure()}}
uses: appleboy/telegram-action@master uses: appleboy/telegram-action@master
with: with:
to: ${{ secrets.TELEGRAM_TO }} to: ${{ secrets.TELEGRAM_TO }}