Merge pull request #50 from hicsail/feat/mobile-ts #155
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push images to Docker Hub | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main", "staging" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build-and-push-strapi: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ secrets.DOCKERHUB_USERNAME }}/restore-strapi | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Build and push Strapi | |
uses: docker/build-push-action@v4 | |
with: | |
context: "{{defaultContext}}:packages/strapi" | |
file: ./Dockerfile | |
#file: ./Dockerfile.prod | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
build-and-push-client: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ secrets.DOCKERHUB_USERNAME }}/restore-client | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Build and push Client | |
uses: docker/build-push-action@v4 | |
with: | |
context: "{{defaultContext}}:packages/client" | |
file: ./Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} |