Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Greenlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arbeitsgruppe Hardwarenahe IT-Systeme
Greenlight
Commits
81b863a8
Unverified
Commit
81b863a8
authored
Nov 4, 2022
by
Ahmad Farhat
Committed by
GitHub
Nov 4, 2022
Browse files
Options
Downloads
Patches
Plain Diff
Added release workflow (#4043)
parent
3edb3868
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.github/workflows/ci.build.push.yml
+2
-1
2 additions, 1 deletion
.github/workflows/ci.build.push.yml
.github/workflows/ci.build.release.yml
+110
-0
110 additions, 0 deletions
.github/workflows/ci.build.release.yml
.github/workflows/ci.yml
+1
-4
1 addition, 4 deletions
.github/workflows/ci.yml
with
113 additions
and
5 deletions
.github/workflows/ci.build.push.yml
+
2
−
1
View file @
81b863a8
env
:
RUBY_VERSION
:
2.7
RUBY_VERSION
:
3.1
name
:
CI Build Push
on
:
...
...
@@ -7,6 +7,7 @@ on:
branches-ignore
:
-
v1
-
v2
-
v3
-
translations*
jobs
:
...
...
This diff is collapsed.
Click to expand it.
.github/workflows/ci.build.release.yml
0 → 100644
+
110
−
0
View file @
81b863a8
env
:
RUBY_VERSION
:
3.1
name
:
CI Build Release
on
:
release
:
types
:
[
released
]
jobs
:
main
:
name
:
Build Docker Image
env
:
DOCKER_REPOSITORY
:
${{ secrets.DOCKER_REPOSITORY }}
DOCKER_BUILD_ENABLED
:
${{ secrets.DOCKER_BUILD_ENABLED }}
DOCKER_BUILD_ALTERNATE_ENABLED
:
${{ secrets.DOCKER_BUILD_ALTERNATE_ENABLED }}
runs-on
:
ubuntu-20.04
steps
:
-
name
:
Checkout
if
:
contains(env.DOCKER_BUILD_ENABLED, 'true')
uses
:
actions/checkout@v2
-
name
:
Set up Docker Buildx
if
:
contains(env.DOCKER_BUILD_ENABLED, 'true')
uses
:
docker/setup-buildx-action@v1
-
name
:
Cache Docker layers
if
:
contains(env.DOCKER_BUILD_ENABLED, 'true')
uses
:
actions/cache@v2
with
:
path
:
/tmp/.buildx-cache
key
:
${{ runner.os }}-buildx-${{ github.sha }}
restore-keys
:
|
${{ runner.os }}-buildx-
-
name
:
Login to DockerHub
if
:
contains(env.DOCKER_BUILD_ENABLED, 'true')
uses
:
docker/login-action@v1
with
:
username
:
${{ secrets.DOCKER_USERNAME }}
password
:
${{ secrets.DOCKER_PASSWORD }}
-
name
:
Extract Docker Repository
id
:
ci_docker_repository
if
:
contains(env.DOCKER_BUILD_ENABLED, 'true')
shell
:
bash
run
:
echo "##[set-output name=repository;]$(echo ${DOCKER_REPOSITORY:-$GITHUB_REPOSITORY})"
-
name
:
Extract Tag Release Version
id
:
ci_tag_release_version
if
:
contains(env.DOCKER_BUILD_ENABLED, 'true')
shell
:
bash
run
:
echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/} | cut -c 9-)"
-
name
:
Extract Tag Release Major
id
:
ci_tag_release_major
if
:
contains(env.DOCKER_BUILD_ENABLED, 'true')
shell
:
bash
run
:
echo "##[set-output name=tag;]$(echo ${{steps.ci_tag_release_version.outputs.tag}} | cut -f1-1 -d'.')"
-
name
:
Extract Tag Release Minor
id
:
ci_tag_release_minor
if
:
contains(env.DOCKER_BUILD_ENABLED, 'true')
shell
:
bash
run
:
echo "##[set-output name=tag;]$(echo ${{steps.ci_tag_release_version.outputs.tag}} | cut -f1-2 -d'.')"
-
name
:
Build and Push
if
:
contains(env.DOCKER_BUILD_ENABLED, 'true')
uses
:
docker/build-push-action@v2
with
:
push
:
true
tags
:
|
"${{ steps.ci_docker_repository.outputs.repository }}:v${{ steps.ci_tag_release_version.outputs.tag }}"
"${{ steps.ci_docker_repository.outputs.repository }}:v${{ steps.ci_tag_release_major.outputs.tag }}"
"${{ steps.ci_docker_repository.outputs.repository }}:v${{ steps.ci_tag_release_minor.outputs.tag }}"
"${{ steps.ci_docker_repository.outputs.repository }}:latest"
build-args
:
"
VERSION_TAG=release-${{
steps.ci_tag_release_version.outputs.tag
}}"
cache-from
:
type=local,src=/tmp/.buildx-cache
cache-to
:
type=local,dest=/tmp/.buildx-cache-new
# Alternate Image with alpine
-
name
:
Alternate Alpine Build and Push
if
:
contains(env.DOCKER_BUILD_ENABLED, 'true') && contains(env.DOCKER_BUILD_ALTERNATE_ENABLED, 'true')
uses
:
docker/build-push-action@v2
with
:
file
:
dockerfiles/v2/alpine
push
:
true
tags
:
|
"${{ steps.ci_docker_repository.outputs.repository }}:v${{ steps.ci_tag_release_version.outputs.tag }}-alpine"
build-args
:
"
VERSION_TAG=release-${{
steps.ci_tag_release_version.outputs.tag
}}"
cache-from
:
type=local,src=/tmp/.buildx-cache
cache-to
:
type=local,dest=/tmp/.buildx-cache-new
# Alternate Image with amazonlinux
-
name
:
Alternate Amazon Linux Build and Push
if
:
contains(env.DOCKER_BUILD_ENABLED, 'true') && contains(env.DOCKER_BUILD_ALTERNATE_ENABLED, 'true')
uses
:
docker/build-push-action@v2
with
:
file
:
dockerfiles/v2/amazonlinux
push
:
true
tags
:
|
"${{ steps.ci_docker_repository.outputs.repository }}:v${{ steps.ci_tag_release_version.outputs.tag }}-amazonlinux"
build-args
:
"
VERSION_TAG=release-${{
steps.ci_tag_release_version.outputs.tag
}}"
cache-from
:
type=local,src=/tmp/.buildx-cache
cache-to
:
type=local,dest=/tmp/.buildx-cache-new
-
name
:
Move cache
if
:
contains(env.DOCKER_BUILD_ENABLED, 'true')
run
:
|
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.github/workflows/ci.yml
+
1
−
4
View file @
81b863a8
...
...
@@ -10,7 +10,7 @@ on:
jobs
:
test
:
name
:
Rubocop + RSpec + ESLint
+ Jest
name
:
Rubocop + RSpec + ESLint
runs-on
:
ubuntu-20.04
services
:
...
...
@@ -66,6 +66,3 @@ jobs:
-
name
:
Run ESLint
run
:
npx eslint app/javascript/* --ext .js,.jsx
-
name
:
Run Jest
run
:
npx jest --passWithNoTests -u
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