Skip to content

Commit

Permalink
Update build-and-publish-docker-images-workflow.yml
Browse files Browse the repository at this point in the history
changing to dynamically setting image tags
  • Loading branch information
AlexanderWollbrink authored Sep 26, 2023
1 parent 5d842c3 commit 3ee7ca3
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/build-and-publish-docker-images-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build-and-publish-docker-images-workflow

on:
push:
branches:
- main
- staging
- development

release:
types: [published]
Expand All @@ -18,26 +22,34 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set environment for branch
run: |
if [[ "${{github.base_ref}}" == "master" || "${{github.ref}}" == "refs/heads/master" ]]; then
echo "IMAGE_TAG=latest" >> "$GITHUB_ENV"
else
echo "IMAGE_TAG=unstable" >> "$GITHUB_ENV"
fi
- name: Build and push All in One image
uses: docker/build-push-action@v5
with:
file: ./Dockerfile
context: .
push: true
tags: fraunhoferiosb/aasportal_aio:latest
tags: fraunhoferiosb/aasportal_aio:${{env.IMAGE_TAG}}

- name: Build and push AASPortal (frontend) image
uses: docker/build-push-action@v5
with:
file: ./Dockerfile.aas-portal
context: .
push: true
tags: fraunhoferiosb/aasportal_aasportal:latest
tags: fraunhoferiosb/aasportal_aasportal:{{env.IMAGE_TAG}}

- name: Build and push AASServer (backend) image
uses: docker/build-push-action@v5
with:
file: ./Dockerfile.aas-server
context: .
push: true
tags: fraunhoferiosb/aasportal_aasserver:latest
tags: fraunhoferiosb/aasportal_aasserver:{{env.IMAGE_TAG}}

0 comments on commit 3ee7ca3

Please sign in to comment.