diff --git a/.github/workflows/ci-cd-production.yml b/.github/workflows/ci-cd-production.yml index 28e3142..475fe26 100644 --- a/.github/workflows/ci-cd-production.yml +++ b/.github/workflows/ci-cd-production.yml @@ -69,3 +69,25 @@ jobs: npx vercel \ --token ${{ secrets.VERCEL_TOKEN }} \ --prod + + docker-hub-deploy: + runs-on: ubuntu-latest + needs: [test-and-lint] + + steps: + - uses: actions/checkout@v2 + - name: Deploy to Docker Hub production + env: + CI_CONTAINER_REGISTRY: ${{ secrets.CI_CONTAINER_REGISTRY }} + CI_CONTAINER_REGISTRY_PASSWORD: ${{ secrets.CI_CONTAINER_REGISTRY_PASSWORD }} + CI_CONTAINER_REGISTRY_USERNAME: ${{ secrets.CI_CONTAINER_REGISTRY_USERNAME }} + run: | + npx mersocarlin-deployer \ + --provider dockerHub \ + --container-registry-host $CI_CONTAINER_REGISTRY \ + --container-registry-username $CI_CONTAINER_REGISTRY_USERNAME \ + --container-registry-password $CI_CONTAINER_REGISTRY_PASSWORD \ + --dockerfile-path Dockerfile.prod \ + --repository-name $CI_CONTAINER_REGISTRY_REPOSITORY_NAME \ + --repository-tag mersocarlin \ + --verbose diff --git a/.github/workflows/ci-cd-staging.yml b/.github/workflows/ci-cd-staging.yml index 9136d91..31668ee 100644 --- a/.github/workflows/ci-cd-staging.yml +++ b/.github/workflows/ci-cd-staging.yml @@ -68,3 +68,25 @@ jobs: VERCEL_PROJECT_ID=${{ secrets.VERCEL_PROJECT_ID }} \ npx vercel \ --token ${{ secrets.VERCEL_TOKEN }} + + docker-hub-deploy: + runs-on: ubuntu-latest + needs: [test-and-lint] + + steps: + - uses: actions/checkout@v2 + - name: Deploy to Docker Hub production + env: + CI_CONTAINER_REGISTRY: ${{ secrets.CI_CONTAINER_REGISTRY }} + CI_CONTAINER_REGISTRY_PASSWORD: ${{ secrets.CI_CONTAINER_REGISTRY_PASSWORD }} + CI_CONTAINER_REGISTRY_USERNAME: ${{ secrets.CI_CONTAINER_REGISTRY_USERNAME }} + run: | + npx mersocarlin-deployer \ + --provider dockerHub \ + --container-registry-host $CI_CONTAINER_REGISTRY \ + --container-registry-username $CI_CONTAINER_REGISTRY_USERNAME \ + --container-registry-password $CI_CONTAINER_REGISTRY_PASSWORD \ + --dockerfile-path Dockerfile.prod \ + --repository-name $CI_CONTAINER_REGISTRY_REPOSITORY_NAME \ + --repository-tag mersocarlin.staging \ + --verbose