43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Build and Push to Docker Hub
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'v3'
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout the repository
|
|
uses: actions/checkout@v3.0.0
|
|
|
|
- name: Login to DigitalOcean Container Registry
|
|
uses: docker/login-action@v1.14.1
|
|
with:
|
|
registry: registry.digitalocean.com
|
|
username: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
|
password: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
|
|
|
- name: Copy Environment Variable Configuration
|
|
run: echo $ENV_FILE | base64 --decode > .env
|
|
env:
|
|
ENV_FILE: ${{ secrets.ENV_FILE }}
|
|
|
|
- name: Build and Push Server Docker Image
|
|
uses: docker/build-push-action@v2.9.0
|
|
with:
|
|
context: .
|
|
push: true
|
|
file: server/Dockerfile
|
|
tags: registry.digitalocean.com/reactive-resume/server:latest
|
|
|
|
- name: Build and Push Client Docker Image
|
|
uses: docker/build-push-action@v2.9.0
|
|
with:
|
|
context: .
|
|
push: true
|
|
file: client/Dockerfile
|
|
tags: registry.digitalocean.com/reactive-resume/client:latest
|