Skip to content

Commit

Permalink
update deploy file
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Nov 3, 2023
1 parent 1d2a492 commit 39c9099
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/staging-deploy-action.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
name: 'Staging-Deploy'

on:
pull_request:
types:
- closed
branches: [ main ]
[push]

jobs:
staging-okr-deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout project
Expand Down Expand Up @@ -73,13 +69,32 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Build and push the docker image
- name: Build the docker image
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile
push: true
tags: ${{ secrets.TAG }}:${{ steps.store-version.outputs.version}}-STAGING
load: true
push: false

- name: Run docker image
uses: addnab/docker-run-action@v3
with:
image: ${{ secrets.TAG }}:${{ steps.store-version.outputs.version}}-STAGING


- name: Cypress run e2e tests
uses: cypress-io/github-action@v6
with:
working-directory: frontend
start: npm start
wait-on: 'http://localhost:8080/config'
wait-on-timeout: 120
browser: chrome

- name: Push the docker image
run: docker push ${{ secrets.TAG }}:${{ steps.store-version.outputs.version}}-STAGING

- name: Trigger Deployment Workflow with latest Version
uses: actions/checkout@v3
Expand Down

0 comments on commit 39c9099

Please sign in to comment.