Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Base Worker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Workers
Base Worker
Commits
50ca57b0
Commit
50ca57b0
authored
1 year ago
by
Yoann Schneider
Committed by
Manon Blanco
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Use Default branch instead of expecting main
parent
b74af347
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!417
Use Default branch instead of expecting main
Pipeline
#138061
passed
1 year ago
Stage: test
Stage: build
Stage: release
Stage: deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
worker-{{cookiecutter.slug}}/ci/build.sh
+1
-1
1 addition, 1 deletion
worker-{{cookiecutter.slug}}/ci/build.sh
with
1 addition
and
1 deletion
worker-{{cookiecutter.slug}}/ci/build.sh
+
1
−
1
View file @
50ca57b0
...
...
@@ -20,7 +20,7 @@ cd $CI_PROJECT_DIR
docker build
-f
Dockerfile
.
-t
"
$IMAGE_TAG
"
# Publish the image on the main branch or on a tag
if
[
"
$CI_COMMIT_REF_NAME
"
=
"
main
"
-o
-n
"
$CI_COMMIT_TAG
"
]
;
then
if
[
"
$CI_COMMIT_REF_NAME
"
=
"
$CI_DEFAULT_BRANCH
"
-o
-n
"
$CI_COMMIT_TAG
"
]
;
then
if
[
-n
"
$CI_REGISTRY
"
-a
-n
"
$CI_REGISTRY_USER
"
-a
-n
"
$CI_REGISTRY_PASSWORD
"
]
;
then
echo
$CI_REGISTRY_PASSWORD
| docker login
-u
$CI_REGISTRY_USER
--password-stdin
$CI_REGISTRY
docker push
$IMAGE_TAG
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment