Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zoom-python-webhook
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Samuel Guillemet
zoom-python-webhook
Merge requests
!16
RELEASE: Bump to 0.2.1
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
RELEASE: Bump to 0.2.1
develop
into
main
Overview
2
Commits
13
Pipelines
0
Changes
17
Merged
Samuel Guillemet
requested to merge
develop
into
main
1 year ago
Overview
2
Commits
13
Pipelines
0
Changes
17
Expand
Created by: SamuelGuillemet
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
b0874bf5
13 commits,
1 year ago
17 files
+
572
−
502
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
17
Search (e.g. *.vue) (Ctrl+P)
.github/workflows/build.yml
+
34
−
15
Options
@@ -11,27 +11,45 @@ env:
HARBOR_REGISTRY
:
registry.cern.ch
jobs
:
get-tag-name
:
get-version
:
if
:
github.event.workflow_run.conclusion == 'success'
runs-on
:
ubuntu-latest
outputs
:
tag_name
:
${{ steps.
release-on-push
.outputs.tag_name }}
tag_name
:
${{ steps.
get-tag-name
.outputs.tag_name }}
steps
:
-
name
:
Get the tag name generated by the release-on-push workflow
id
:
release-on-push
uses
:
actions/github-script@v4
-
name
:
Download artifact
uses
:
actions/github-script@v6
with
:
github-token
:
${{ secrets.GITHUB_TOKEN }}
script
:
|
const last_release = await github.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo,
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
const last_release_tag = last_release.data.tag_name;
core.setOutput("tag_name", last_release_tag);
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == "version_number"
})[0];
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/version_number.zip`, Buffer.from(download.data));
-
name
:
Unzip artifact
run
:
unzip version_number.zip
-
name
:
Get tag name
id
:
get-tag-name
run
:
|
echo "tag_name=$(cat version_number)" >> $GITHUB_OUTPUT
build-and-push-to-github
:
runs-on
:
ubuntu-latest
needs
:
get-tag-name
needs
:
get-version
if
:
needs.get-version.outputs.tag_name != ''
steps
:
-
name
:
Checkout repository
uses
:
actions/checkout@v3
@@ -47,13 +65,14 @@ jobs:
run
:
|
docker compose -f docker-compose.yml -f docker-compose.github.yml build
docker compose -f docker-compose.yml -f docker-compose.github.yml push
export tag=${{ needs.get-
tag-name
.outputs.tag_name }}
export tag=${{ needs.get-
version
.outputs.tag_name }}
docker compose -f docker-compose.yml -f docker-compose.github.yml build
docker compose -f docker-compose.yml -f docker-compose.github.yml push
build-and-push-to-harbor
:
runs-on
:
ubuntu-latest
needs
:
get-tag-name
needs
:
get-version
if
:
needs.get-version.outputs.tag_name != ''
steps
:
-
name
:
Checkout repository
uses
:
actions/checkout@v3
@@ -69,6 +88,6 @@ jobs:
run
:
|
docker compose -f docker-compose.yml -f docker-compose.harbor.yml build
docker compose -f docker-compose.yml -f docker-compose.harbor.yml push
export tag=${{ needs.get-
tag-name
.outputs.tag_name }}
export tag=${{ needs.get-
version
.outputs.tag_name }}
docker compose -f docker-compose.yml -f docker-compose.harbor.yml build
docker compose -f docker-compose.yml -f docker-compose.harbor.yml push
Loading