Skip to content

Merge pull request #108 from Nfactor26/map-app-to-viewmodel #8

Merge pull request #108 from Nfactor26/map-app-to-viewmodel

Merge pull request #108 from Nfactor26/map-app-to-viewmodel #8

name: Publish image to docker hub on tag push to main
on:
push:
tags:
- v*
jobs:
build-docker-image:
uses: ./.github/workflows/identity-build-docker-image.yaml
test-with-postgres-db:
needs: build-docker-image
uses: ./.github/workflows/identity-test-docker-image-with-postgres.yaml
test-with-mongo-db:
needs: build-docker-image
uses: ./.github/workflows/identity-test-docker-image-with-mongo.yaml
publish-to-docker-hub:
needs: [test-with-postgres-db, test-with-mongo-db]
runs-on: ubuntu-latest
environment: docker-hub
steps:
- name: Download and load docker image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "pixel-identity:local"
- name: Login to docker hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Tag image
run: docker tag pixel-identity:local ${{ secrets.DOCKERHUB_USERNAME }}/pixel-identity:${{ github.ref_name }}
- name: Push image to docker hub
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/pixel-identity:${{ github.ref_name }}