A framework for higher gauge theory based on a 2-group is presented, by constructing a groupoid of connections on a manifold acted on by a 2-group of gauge transformations, following previous work by the authors where the general notion of the action of a 2-group on a category was defined. The connections are discretized, given by assignments of 2-group data to 1-and 2cells coming from a given cell structure on the manifold, and likewise the gauge transformations are given by 2-group assignments to 0-cells. The 2-cells of the manifold are endowed with a bigon structure, matching the 2-dimensional algebra of squares which is used for calculating with 2-group data. Showing that the action of the 2-group of gauge transformations on the groupoid of connections is well-defined is the central result. The effect, on the groupoid of connections, of changing the discretization is studied, and partial results and conjectures are presented around this issue. The transformation double category that arises from the action of a 2-group on a category, as defined in previous work by the authors, is described for the case at hand, where it becomes a transtormation double groupoid. Finally, examples of the construction are given for simple choices of manifold: the circle, the 2-sphere and the torus.