Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Github Actions prod.yml
name: Build Containers for Prod & Push to Dockerhub
# Anytime a pull request or push to master branch occurs then do the following jobs
# commented out docker actions and using opspresso for now
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build-and-deploy-server:
name: Build and Deploy Back-end
# spins up a ubuntu environment
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and push Docker image
# uses: docker/build-push-action@v1
uses: opspresso/action-docker@master
# with:
env:
# username: ${{ secrets.DOCKER_USERNAME }}
USERNAME: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
# registry: cloud.canister.io:5000
REGISTRY: cloud.canister.io:5000
# repository: ip2024/uz-server
IMAGE_NAME: ip2024/uz-server
# dockerfile: server/Dockerfile
DOCKERFILE: server/Dockerfile
# tags: latest
LATEST: "true"
build-and-deploy-client:
name: Build and Deploy Front-end
# spins up a ubuntu environment
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and push Docker image
# uses: docker/build-push-action@v1
uses: opspresso/action-docker@master
# with:
env:
# username: ${{ secrets.DOCKER_USERNAME }}
USERNAME: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
# registry: cloud.canister.io:5000
REGISTRY: cloud.canister.io:5000
# repository: ip2024/uz-client
IMAGE_NAME: ip2024/uz-client
# dockerfile: client/Dockerfile
DOCKERFILE: client/Dockerfile
# tags: latest
LATEST: "true"
build-and-deploy-web:
name: Build and Deploy Website
# spins up a ubuntu environment
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and push Docker image
# uses: docker/build-push-action@v1
uses: opspresso/action-docker@master
# with:
env:
# username: ${{ secrets.DOCKER_USERNAME }}
USERNAME: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
# registry: cloud.canister.io:5000
REGISTRY: cloud.canister.io:5000
# repository: ip2024/uz-web
IMAGE_NAME: ip2024/uz-web
# dockerfile: web/Dockerfile
DOCKERFILE: web/Dockerfile
# tags: latest
LATEST: "true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment