Can I hang a porch swing on a ceiling truss that's 2x6 and 8' long
A single 2x6 cannot be a "truss". Most trusses are two supporting members connected by cross-members in the shape of a triangle or cube (think: truss bridge or box-kite). You probably meant "joist".
Short answer: probably.
Long answer: It depends on the answers to the following questions:
Will both chains be attached to a single 2x6 or to two different 2x6's?
Why is the 2x6 there (to support a floor, part of the porch roof structure)?
What loads (without the swing) is it already carrying (floor, roof)?
What else is attached to the joist (plywood, drywall, blocking)?
How is the joist supported (resting on headers w/o strapping, strapped, attached to rim joist/microlam)?
How much weight are the swing (chains) rated for (thus indicating the max. weight on the underside of the joist)?
How wide is the swing? Where will the force be applied to the joist via the chains (in the middle, along one side)?