Push project repport #27
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: Docker Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build and Push Docker images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push CLI image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile.cli | |
push: true | |
tags: yassineouhadi/jgen:cli | |
- name: Build and push Web image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile.web | |
push: true | |
tags: yassineouhadi/jgen:web | |
- name: Cache Yarn dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
**/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |