Context. The study of galaxy luminosity functions (LFs) in different environments provides powerful constraints on the physics of galaxy evolution. The infrared (IR) LF is a particularly useful tool since it is directly related to the distribution of galaxy star-formation rates (SFRs). Aims. We aim to determine the galaxy IR LF as a function of the environment in a supercluster at redshift 0.23 to shed light on the processes driving galaxy evolution in and around clusters. Methods. We base our analysis on multi-wavelength data, which include optical, near-IR, and mid-to far-IR photometry, as well as redshifts from optical spectroscopy. We identify 467 supercluster members in a sample of 24-μm-selected galaxies, on the basis of their spectroscopic (153) and photometric (314) redshifts. IR luminosities and stellar masses are determined for supercluster members via spectral energy distribution fitting. Galaxies with active galactic nuclei are identified by a variety of methods and excluded from the sample. SFRs are obtained for the 432 remaining galaxies from their IR luminosities via the Kennicutt relation. Results. We determine the IR LF of the whole supercluster as well as the IR LFs of three different regions in the supercluster: the cluster core, a large-scale filament, and the cluster outskirts (excluding the filament). A comparison of the IR LFs of the three regions, normalized by the average number densities of r-band selected normal galaxies, shows that the filament (respectively, the core) contains the highest (respectively, the lowest) fraction of IR-emitting galaxies at all levels of IR luminosities, and the highest (respectively, the lowest) total SFR normalized by optical galaxy richness. Luminous IR galaxies (LIRGs) are almost absent in the core region. The relation between galaxy specific SFRs and stellar masses does not depend on the environment, and it indicates that most supercluster LIRGs are rather massive galaxies with relatively low specific SFRs. A comparison with previous IR LF determinations from the literature confirms that the mass-normalized total SFR in clusters increases with redshift, but more rapidly than previously suggested for redshifts < ∼ 0.4. Conclusions. The IR LF shows an environmental dependence that is not simply related to the local galaxy density. The filament, an intermediate-density region in the A1763 supercluster, contains the highest fraction of IR-emitting galaxies. We interpret our findings within a possible scenario for the evolution of galaxies in and around clusters.