fix: update Dockerfile for Aptible deployment (#48) #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-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 }} |