Skip to content

fix: update Dockerfile for Aptible deployment (#48) #12

fix: update Dockerfile for Aptible deployment (#48)

fix: update Dockerfile for Aptible deployment (#48) #12

name: build-and-push-docker-image
on:
push:
branches:
- main
jobs:
push-image:
name: Release code
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract tags for Docker images
id: docker-meta
uses: docker/metadata-action@v3
with:
images: aptible/deploy-demo-app
tags: |
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.docker-meta.outputs.tags }}