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 Aug 1, 2024
2 parents 1f8c212 + 6707533 commit 78cf57c
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/docker_image_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,30 @@ jobs:
echo "otobo_commit=${{ github.sha }}"
) >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: 'check out the relevant OTOBO branch'
uses: actions/checkout@v4

-
# check whether an devel image must be built
uses: dorny/paths-filter@v3
id: changes
with:
base: "${{ github.ref_name }}" # e.g rel-10_0
filters: |
context:
- '${{ matrix.context }}/**'
-
name: Set up Docker Buildx
if: steps.changes.outputs.context == 'true'
uses: docker/setup-buildx-action@v3

-
# 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
if: steps.changes.outputs.context == 'true'
uses: docker/build-push-action@v6
with:
load: true
Expand All @@ -113,13 +126,14 @@ jobs:
# 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
if: ${{ matrix.dockerfile == 'otobo.web.dockerfile' }}
if: ${{ steps.changes.outputs.context == 'true' && matrix.dockerfile == 'otobo.web.dockerfile' }}
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 before pushing to Docker Hub
name: Login to Docker Hub
if: steps.changes.outputs.context == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand All @@ -129,6 +143,7 @@ jobs:
# finally upload to DockerHub
# the built image is already available in the job
name: Push to DockerHub
if: steps.changes.outputs.context == 'true'
uses: docker/build-push-action@v6
with:
push: true
Expand Down

0 comments on commit 78cf57c

Please sign in to comment.