Skip to content

fix image name

fix image name #6

Workflow file for this run

name: Build
on:
push:
branches:
- 'main'
env:
APP_IMAGE_NAME: shlyapnikovan/rails-project-lvl2
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build App
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile.production
cache-from: type=registry,ref=${{ env.APP_IMAGE_NAME }}:cached
cache-to: type=inline
push: true
tags: ${{ env.APP_IMAGE_NAME }}:cached
- name: Check
run: make compose-production-test
- name: Push
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile.production
cache-from: type=registry,ref=${{ env.APP_IMAGE_NAME }}:cached
push: true
tags: ${{ env.APP_IMAGE_NAME }}:latest