Skip to content

Create and publish CI/CD Docker image #960

Create and publish CI/CD Docker image

Create and publish CI/CD Docker image #960

Workflow file for this run

name: Create and publish CI/CD Docker image
on:
push:
tags:
- '[6-9].[0-9].[0-9]-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]_[0-9]'
jobs:
parse-docker-build-env:
name: 'Parse Docker Build Environment'
runs-on: ubuntu-latest
outputs:
buildTags: ${{ steps.detect-push-event.outputs.buildTags }}
steps:
- name: Check if push is a tag or branch
id: detect-push-event
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
echo "This is a tag push (${GITHUB_REF#refs/tags/})"
echo "Building docker tag: ${GITHUB_REF#refs/tags/}"
echo "buildTags=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
else
echo "Unknown push type"
exit 1
fi
build-dockerhub-image:
permissions:
contents: read
packages: write
name: "Build Docker Images to DockerHub Registry"
uses: exoplatform/swf-scripts/.github/workflows/buildDockerImage.yml@master
needs: parse-docker-build-env
with:
dockerImage: "exoplatform/exo"
dockerImageTag: ${{ needs.parse-docker-build-env.outputs.buildTags }}
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}