Editorconfig (#35) #12
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 | |
on: | |
push: | |
branches: | |
- main | |
- gh-build-and-push | |
jobs: | |
push_to_registry: | |
name: Build and Push (DockerHub) | |
runs-on: ubuntu-latest | |
steps: | |
- name: check repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Cache Docker layers | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: login to docker registry | |
uses: docker/login-action@v3 | |
with: | |
username: ${{secrets.DOCKERHUB_USERNAME}} | |
password: ${{secrets.DOCKERHUB_TOKEN}} | |
- name: build and push docker image to registry - database | |
uses: docker/build-push-action@v5 | |
with: | |
context: database/ | |
push: true | |
tags: enblitztechnologies/healthnest:database | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
- name: build and push docker image to registry - backend | |
uses: docker/build-push-action@v5 | |
with: | |
context: backend/ | |
push: true | |
tags: enblitztechnologies/healthnest:backend | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
- name: build and push docker image to registry - frontend | |
uses: docker/build-push-action@v6 | |
with: | |
context: frontend/ | |
push: true | |
tags: enblitztechnologies/healthnest:frontend | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |