So you agree that the Attack Action came before the attack?
And
That you can take the attack action without ever making an attack?
Just to clarify so there won't be any confusion:
Action:
Attack (PHB, p.192, paragraphs 2 & 3)
With this action, you make one melee or ranged attack. See the "Making an Attack" section for the rules that govern attacks.
Certain features, such as the Extra Attack feature of the fighter, allow you to make more than one attack with this action.
Making an Attack (PHB, p. 194)
Step 1. Choose a target. Pick a target within your attack's range: a creature, an object, or a location.
Step 2. Determine modifiers. The DM determines... (sorry, not typing the rest up)
Step 3. Resolve the attack. You make the attack roll. On a hit... (again, you can look it up)
There, now to the meat of it...
The Attack action is what allows you to make your attack, following steps 1-3.
To answer the first question: Yes, the Attack action comes before the attack (with notable exceptions due to spells, etc.)
It must since without it you cannot Make the Attack (Steps 1-3). Certain exceptions exist of course, such as Green-Flame Blade,
"As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell's range, otherwise the spell fails.", which allow you to make an attack without taking the Attack action, but these are specific cases and they trump the general action needed to make an attack (i.e. the Attack action). As we all know, specific beats general.
In the a case of Sanctuary: you
ARE making your attack, however you might be prevented from making your attack
roll (Step 3). You begin with Step 1, choosing your target. The Sanctuary spell is then handled by the DM in step 2. Excerpt taken from the Sanctuary spell:
Until the spell ends, any creature who targets the warded creature with an attack or a harmful spell must first make a Wisdom saving throw. On a failed save, the creature must choose a new target or lose the attack or spell. The DM informs you that since you targeted a creature (Step 1) that is warded you must first make a Wisdom saving throw. If you fail, you must return to Step 1 and choose a new target. If you cannot choose a new target, you
lose the attack as per the description of the Sanctuary spell. Step 3 is completed because your attack was resolved--you lost it, or you choose a new target and completed the steps with that target instead, resolved by making your attack roll.
If you can only make one attack (no Extra Attack yet, etc.), and fail the Wisdom saving throw, you have taken the Attack action, made your attack, and lost the opportunity to make the attack roll due to the interference of the Sanctuary spell. By failing the save, the resolution (Step 3) is that the attack is lost instead of you being allowed to make the attack roll.
To answer the second question: No, you cannot take the Attack action without making an attack.
You can, however, take the Attack action without ever making an attack
ROLL. To say you are going to take the Attack action, and then never choose a target for your attack (Step 1), you are in fact, doing nothing, therefore NOT taking the Attack action. To take the Attack action
demands that you follow Steps 1-3: choose target, DM determines modifiers/situation, resolve attack. By not choosing a target, you are violating Step 1 and you are not taking the Attack action. If, after the DM finishes determining what is needed in Step 2, you then choose not to resolve the attack by making the roll (if the DM determines you can), you are not taking the Attack action because you are in violation of Step 3. By not choosing a target or by not resolving a viable attack roll, you are breaking the steps needed to take the Attack action. Until the results of the attack are resolved (Step 3), i.e. a hit, a miss, a lost attack, or whatever else the DM determines constitutes resolution of the attack, you have not taking the Attack action.
Once you have completed steps 1-3 for each available attack you are granted by the Attack action (including more attacks gained through the Extra Attack feature), you have completed your Attack action. Until then, you are taking your Attack action. The official rules at this point are that until your Attack action is finished, you have not satisfied the requirements needed to gain the bonus action to Shove granted by the Shield Master feat.
I hope for the people who really do understand this, please don't be argumentative just for the sake of it. If you honestly still have confusion, I am happy to offer further explanation (at least as far as I understand it...).