Skip to content

Commit

Permalink
Add support for other branches (integration mode)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoetmaaiers committed Jun 26, 2024
1 parent 24e1355 commit b9d8b5a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci-cd-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ jobs:
- name: Determine tag
id: tag
run: |
if [[ ${{ github.ref }} == 'refs/heads/main' ]]; then
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
NORMALIZED_BRANCH_NAME="${BRANCH_NAME/\//-}"
if [[ $BRANCH_NAME == 'main' ]]; then
echo "::set-output name=tag::latest"
elif [[ ${{ github.ref }} == 'refs/heads/develop' ]]; then
elif [[ $BRANCH_NAME == 'develop' ]]; then
echo "::set-output name=tag::latest-dev"
else
echo "::set-output name=tag::${NORMALIZED_BRANCH_NAME}"
fi
- name: Build and push
uses: docker/build-push-action@v6
Expand Down

0 comments on commit b9d8b5a

Please sign in to comment.