Skip to content

Commit

Permalink
Merge pull request #225 from Ohtuilmo/production-workflow
Browse files Browse the repository at this point in the history
Add workflow for production deployment
  • Loading branch information
ismomehdi authored Mar 25, 2024
2 parents 6e5b6d7 + 61ab874 commit 3108999
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Deploy to staging

on:
release:
types: [published]

jobs:
test:
uses: ./.github/workflows/test.yaml
secrets: inherit

build-and-push:
runs-on: ubuntu-latest
needs: test

steps:
- uses: actions/checkout@v4

- name: Build backend
id: build-backend
uses: redhat-actions/buildah-build@v2
with:
image: backend
tags: production ${{ github.sha }}
context: backend/
containerfiles: |
backend/Dockerfile
- name: Build frontend
id: build-frontend
uses: redhat-actions/buildah-build@v2
with:
image: frontend
tags: production ${{ github.sha }}
context: frontend/
containerfiles: |
frontend/Dockerfile
- name: Push backend to quay.io
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-backend.outputs.image }}
tags: ${{ steps.build-backend.outputs.tags }}
registry: quay.io/ohtuilmo
username: ohtuilmo+github
password: ${{ secrets.QUAY_PASSWORD }}

- name: Push frontend to quay.io
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-frontend.outputs.image }}
tags: ${{ steps.build-frontend.outputs.tags }}
registry: quay.io/ohtuilmo
username: ohtuilmo+github
password: ${{ secrets.QUAY_PASSWORD }}

0 comments on commit 3108999

Please sign in to comment.