Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FACT Data Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FACT
FACT Utils
FACT Data Project
Commits
92e84a6b
Commit
92e84a6b
authored
4 months ago
by
Riccardo Boero
Browse files
Options
Downloads
Patches
Plain Diff
Add package registration on tag issue
parent
fcb73bcc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+44
-1
44 additions, 1 deletion
.gitlab-ci.yml
with
44 additions
and
1 deletion
.gitlab-ci.yml
+
44
−
1
View file @
92e84a6b
...
@@ -3,7 +3,9 @@ image: julia:latest
...
@@ -3,7 +3,9 @@ image: julia:latest
stages
:
stages
:
-
documentation
-
documentation
-
deploy
-
deploy
-
register
# Documentation stage
build documentation
:
build documentation
:
stage
:
documentation
stage
:
documentation
script
:
script
:
...
@@ -16,6 +18,7 @@ build documentation:
...
@@ -16,6 +18,7 @@ build documentation:
only
:
only
:
-
main
-
main
# Deploy stage for GitLab Pages
pages
:
pages
:
stage
:
deploy
stage
:
deploy
script
:
script
:
...
@@ -24,4 +27,44 @@ pages:
...
@@ -24,4 +27,44 @@ pages:
paths
:
paths
:
-
public
-
public
only
:
only
:
-
main
-
main
register package
:
stage
:
register
before_script
:
# Install git
-
apt-get update && apt-get install -y git
# Ensure we're in the package root directory
-
cd $CI_PROJECT_DIR
# Clone the registry repository
-
git clone https://${REGISTRY_TOKEN}@git.nilu.no/julia/registry.git /tmp/registry
# Set Git user name and email
-
git config --global user.name "Registry Bot"
-
git config --global user.email "bot@git.nilu.no"
script
:
# Use a temporary Julia environment for LocalRegistry
-
julia -e '
using Pkg;
Pkg.activate(temp=true);
Pkg.add("LocalRegistry");
using LocalRegistry;
LocalRegistry.register(
registry = "/tmp/registry",
commit =
true
,
push =
false
,
ignore_reregistration =
false
,
allow_package_dirty =
true
);
'
# Push changes to the registry
-
|
cd /tmp/registry
git push https://gitlab-ci-token:$REGISTRY_TOKEN@git.nilu.no/julia/registry.git main
only
:
-
tags
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