Foley first played for Cork as a member of the minor team on 11 May 1983. He was introduced as a substitute in Cork's narrow 2–13 to 1-15 Munster semi-final defeat by
Limerick. After missing the 1984 championship due to a broken jaw, Foley was back the following year as a member of the starting fifteen. A 1–13 to 1–8 defeat of
Tipperary secured a centenary year
Munster medal.
Wexford provided the opposition in the subsequent All-Ireland decider on 1 September 1985. A 3–10 to 0–12 victory gave him an
All-Ireland Minor Hurling Championship medal. In 1987 Foley was a late addition to the Cork junior team that faced Wexford in the All-Ireland decider on 25 July 1987. A narrow 3–11 to 2–13 victory gave Cork the victory and secured an
All-Ireland medal for Foley. The following Foley was at full-forward on the Cork under-21 team. He won a
Munster medal that year following a 4–12 to 1–7 defeat of Limerick. Cork subsequently faced
Kilkenny in the All-Ireland decider on 11 September 1988. Played in
St. Brendan's Park,
Birr to commemorate the centenary of the very first senior All-Ireland final being played there, Cork triumphed by 4–12 to 1–5, with Foley winning an
All-Ireland Under-21 Hurling Championship medal. After being included and subsequently omitted from the Cork senior panel in 1987 and 1988, Foley made his senior championship debut on 4 June 1989 in an 0-18 apiece Munster semi-final draw with
Waterford. By 1990 Foley was a regular member of the starting fifteen. He won his first
Munster medal on that year after a
man of the match performance in the decider. Foley's 2-7 contributed to the 4–16 to 2–14 defeat of reigning champions Tipperary. The subsequent All-Ireland final on 2 September 1990 pitted Cork against Galway for the second time in four years. Galway were once again the red-hot favourites and justified this tag by going seven points ahead in the opening thirty-five minutes thanks to a masterful display by
Joe Cooney. Cork fought back with an equally expert display by captain
Tomás Mulcahy. The game was effectively decided on an incident which occurred midway through the second half when Cork goalkeeper
Ger Cunningham blocked a point-blank shot from
Martin Naughton with his nose. The umpires gave no 65-metre free, even though he clearly deflected it out wide. Cork went on to win a high-scoring and open game of hurling by 5–15 to 2–21. The victory gave Foley an
All-Ireland medal. Cork surrendered their titles in 1991, however, Foley claimed his second Munster medal in 1992 following a 1–22 to 3-11 of Limerick. On 6 September 1992 Cork faced Kilkenny in the All-Ireland decider. At half-time Cork were two points ahead, however, two second-half goals by
John Power and
Michael "Titch" Phelan supplemented a first-half
D. J. Carey penalty which gave Kilkenny a 3–10 to 1–12 victory. Foley won a
National Hurling League medal in 1993 following a 3–11 to 1–12 defeat of
Wexford. He was dropped from the starting fifteen for the subsequent championship campaign, a move which effectively brought an end to his inter-county career, as he had started a very busy dental practice in Bantry in West Cork which was demanding huge amounts of his time. ==Inter-provincial career==