diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index e37f8026f..cd9295cb4 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -27,17 +27,21 @@ jobs: - name: Install Buildah run: apt update; apt install -y buildah - if: steps.changed.outputs.any_changed == 'true' + if: >- + github.event_name == 'workflow_dispatch' + || steps.changed.outputs.any_changed == 'true' - name: Build OCI image run: make ${{matrix.tag}} - if: steps.changed.outputs.any_changed == 'true' + if: >- + github.event_name == 'workflow_dispatch' + || steps.changed.outputs.any_changed == 'true' - name: Push image to OCI registry run: make push-${{matrix.tag}} if: >- - steps.changed.outputs.any_changed == 'true' - && github.ref == 'refs/heads/master' - && github.event_name == 'push' + github.ref == 'refs/heads/master' && + (github.event_name == 'workflow_dispatch' || + (steps.changed.outputs.any_changed == 'true' && github.event_name == 'push')) env: REGISTRY_PASSWORD: ${secrets.REGISTRY_PASSWORD}