Skip to content

Commit

Permalink
added a CD for this service
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Dec 11, 2022
1 parent 9c5d580 commit 39d0a42
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/feedback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: feedback CD

on:
push:
workflow_dispatch:

jobs:
# JOB to run change detection
changes:
runs-on: ubuntu-latest
# Set job outputs to values from filter step
outputs:
feedback: ${{ steps.filter.outputs.feedback }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
feedback:
- '.github/**'
- 'feedback/**'
feedback-build:
needs:
- changes
if: ${{ needs.changes.outputs.feedback == 'true' }}
uses: ./.github/workflows/docker-build.yml
with:
image_suffix: feedback
context: ./feedback
dockerfile: Dockerfile
permissions:
contents: read
packages: write
feedback-deployment:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs:
- feedback-build
steps:
- run: curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 && chmod +x /usr/local/bin/argocd
- run: argocd app actions run navigatum-prod restart --kind Deployment --resource-name feedback --auth-token ${{ secrets.ARGOCD_TOKEN }} --server ${{ secrets.ARGOCD_SERVER }}
feedback-staging-deployment:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
needs:
- feedback-build
steps:
- run: curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 && chmod +x /usr/local/bin/argocd
- run: argocd app actions run pr-${{github.event.number}} restart --kind Deployment --resource-name feedback --auth-token ${{ secrets.ARGOCD_TOKEN }} --server ${{ secrets.ARGOCD_SERVER }}

0 comments on commit 39d0a42

Please sign in to comment.