Skip to content

Commit

Permalink
Add release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
anjarakvo committed Jan 31, 2024
1 parent e755131 commit c165ea8
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: IDH-IDC Release Pipeline

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: src

- name: Checkout Akvo composite actions
uses: actions/checkout@v4
with:
repository: akvo/composite-actions
token: ${{ secrets.GH_PAT }}
path: composite-actions
ref: main

- name: Node Operations
uses: ./composite-actions/.github/actions/node-operation
with:
node-version: "18"
node-command: "yarn install --no-progress --frozen-lock && yarn build && rm -rf node_modules"

- name: Docker Build Frontend
uses: ./composite-actions/.github/actions/docker-build
with:
app-name: "idh-idc"
service-name: "frontend"
dockerfile-location: "frontend"

- name: Docker Build Backend
uses: ./composite-actions/.github/actions/docker-build
with:
app-name: "idh-idc"
service-name: "backend"
dockerfile-location: "backend"

- name: Docker Push Frontend
uses: ./composite-actions/.github/actions/docker-push
with:
app-name: "idh-idc"
service-name: "frontend"
gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_REGISTRY }}

- name: Docker Push Backend
uses: ./composite-actions/.github/actions/docker-push
with:
app-name: "idh-idc"
service-name: "backend"
gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_REGISTRY }}

- name: Rollout Frontend
uses: ./composite-actions/.github/actions/rollout
with:
app-name: "idh-idc"
service-name: "frontend"
cluster-name: "test"
gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_K8S }}

- name: Rollout Backend
uses: ./composite-actions/.github/actions/rollout
with:
app-name: "idh-idc"
service-name: "backend"
cluster-name: "test"
gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_K8S }}

0 comments on commit c165ea8

Please sign in to comment.