Skip to content

Commit

Permalink
build-docker: Build from docker-builds with custom tag also.
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangibanelbtactic committed Mar 18, 2024
1 parent b7ad90e commit 3ed0edc
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: docker
on:
push:
tags:
- docker-builds-dev/*
- docker-builds/*

env:
IMAGE_FQDN: ghcr.io/maldua/zimbra-foss-builder
Expand All @@ -13,13 +13,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Split branch name
env:
BRANCH: ${{ github.ref_name }}
id: split-tag
run: echo "version=${BRANCH##*/}" >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the zimbra-foss-builder Docker image
- name: zimbra-foss-builder Docker image
run: |
docker build --tag ghcr.io/maldua/zimbra-foss-builder:latest . -f Dockerfile-github-ubuntu-20.04
docker push ghcr.io/maldua/zimbra-foss-builder:latest
docker build --tag ${{ env.IMAGE_FQDN }}:latest . -f Dockerfile-github-ubuntu-20.04
docker push ${{ env.IMAGE_FQDN }}:latest
docker tag ${{ env.IMAGE_FQDN }}:latest ${{ env.IMAGE_FQDN }}:docker-${{ steps.split-tag.outputs.version }}
docker push ${{ env.IMAGE_FQDN }}:docker-${{ steps.split-tag.outputs.version }}

0 comments on commit 3ed0edc

Please sign in to comment.