Skip to content

Commit

Permalink
Update dockerhub.yml
Browse files Browse the repository at this point in the history
add candidate support
  • Loading branch information
MishkaMN authored Jan 9, 2024
1 parent fa798ea commit 35bb6d5
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- "develop"
- "master"
jobs:
docker:
runs-on: ubuntu-latest
Expand All @@ -17,34 +18,43 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}


- name: Set Environment Variable for Either Master or Develop
run: |
if [ "${{ github.ref }}" = "refs/heads/develop" ]; then
echo "ENV_VAR=dev" >> $GITHUB_ENV
elif [ "${{ github.ref }}" = "refs/heads/master" ]; then
echo "ENV_VAR=candidate" >> $GITHUB_ENV
fi
shell: bash

- name: Build and Push carma-messenger-ui Docker Image
uses: docker/build-push-action@v3
with:
context: ./carma-messenger-ui/
push: true
tags: usdotfhwastoldev/carma-messenger-ui:${{ github.ref_name }}
tags: usdotfhwastol${{ env.ENV_VAR }}/carma-messenger-ui:${{ github.ref_name }}

- name: Build and Push carma-messenger-core Docker Image
uses: docker/build-push-action@v3
with:
context: ./carma-messenger-core/
push: true
tags: usdotfhwastoldev/carma-messenger-core:${{ github.ref_name }}
tags: usdotfhwastol${{ env.ENV_VAR }}/carma-messenger-core:${{ github.ref_name }}

- name: Build and Push chevrolet_tahoe_2018 Docker Image
uses: docker/build-push-action@v3
with:
context: ./carma-messenger-config/chevrolet_tahoe_2018/
push: true
tags: usdotfhwastoldev/carma-messenger-config:${{ github.ref_name }}-chevrolet_tahoe_2018
tags: usdotfhwastol${{ env.ENV_VAR }}/carma-messenger-config:${{ github.ref_name }}-chevrolet_tahoe_2018

- name: Build and Push development Docker Image
uses: docker/build-push-action@v3
with:
context: ./carma-messenger-config/development/
push: true
tags: usdotfhwastoldev/carma-messenger-config:${{ github.ref_name }}-development
tags: usdotfhwastol${{ env.ENV_VAR }}/carma-messenger-config:${{ github.ref_name }}-development



0 comments on commit 35bb6d5

Please sign in to comment.