Restrict the staging CI to pushes
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Just build and push as staging.
|
||||
# Restrict to pipeline triggered by pushes.
|
||||
if [ $CI_PIPELINE_SOURCE != "push" ]; then
|
||||
echo "This must be only ran from pushes."
|
||||
fi
|
||||
|
||||
# Build and push as staging.
|
||||
docker build -t $CI_REGISTRY_IMAGE:staging .
|
||||
docker push $CI_REGISTRY_IMAGE:staging
|
||||
Reference in New Issue
Block a user