Skip to content

Commit

Permalink
Merge branch 'rel-10_0' into rel-10_1
Browse files Browse the repository at this point in the history
  • Loading branch information
bschmalhofer committed Jul 26, 2024
2 parents 1ab24eb + 432fcd0 commit 5c9962e
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/docker_image_builder.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
%YAML 1.1
---

# Workflow for building Docker images. For now only devel images are built
# and pushed to Docker Hub.
name: 'DockerImageBuilder'

on:
Expand All @@ -8,6 +11,7 @@ on:
push:
branches:
- rel-10_0
- rel-10_1

jobs:
BuildDockerImage:
Expand All @@ -16,15 +20,16 @@ jobs:

steps:

- name: Setup
-
# Store some variables in an environment file so that
# they can be used in the later steps.
name: Setup
run: |
# e.g rel-10_0
branch="${{ github.ref_name }}"
# e.g. 10_0
branch_without_rel="${branch:4}"
mixed_case_repository="${{ github.repository }}"
lowercased_repository="${mixed_case_repository,,}"
branch="${{ github.ref_name }}" # e.g rel-10_0
branch_without_rel="${branch:4}" # e.g. 10_0
docker_tag="devel-$branch_without_rel"
mixed_case_repository="${{ github.repository }}" # e.g. RotherOSS/otobo
lowercased_repository="${mixed_case_repository,,}" # e.g. rotheross/otobo
build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
(
echo "otobo_branch=$branch_without_rel"
Expand All @@ -41,8 +46,8 @@ jobs:
uses: actions/checkout@v4

-
# build the image, not pushing yet, no pushing as DockerHub access is not set up yet
# Caching with Github Actions Cache, limited to 10 GB
# Build the image but do not push it to Docker Hub yet.
# Enable caching with Github Actions Cache, which is limited to 10 GB.
# context: . indicates that the current checkout is used
name: Build
uses: docker/build-push-action@v6
Expand All @@ -62,13 +67,14 @@ jobs:
cache-to: type=gha,mode=max`

-
# Show some files in the image just to check sanity.
# otobo_first_time hasn't run yet, so /opt/otobo is still empty
name: Info
run: |
docker run --rm -w /opt/otobo_install/otobo_next --entrypoint /bin/bash $otobo_ref -c "more git-repo.txt git-branch.txt git-commit.txt RELEASE | cat"
-
# login to Docker Hub only after the build
# login to Docker Hub before pushing to Docker Hub
name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand Down

0 comments on commit 5c9962e

Please sign in to comment.