Skip to content

Commit

Permalink
Automatize deployment on k8s + align CI with bootstrap conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Nov 23, 2023
1 parent c9c7b85 commit ec36519
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 29 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish

on:
push:
branches:
- main

jobs:
build-and-deploy:
name: Build and deploy

runs-on: ubuntu-22.04

steps:
- name: Retrieve source code
uses: actions/checkout@v3

- name: Build and publish Docker Image
uses: openzim/docker-publish-action@v10
with:
image-name: openzim/zimit-ui
on-master: latest
restrict-to: openzim/zimit-frontend
registries: ghcr.io
credentials: GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }}
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }}

- name: Deploy Zimit frontend changes to youzim.it
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.ZIMIT_KUBE_CONFIG }}
with:
args: rollout restart deployments ui-deployment -n zimit
18 changes: 12 additions & 6 deletions .github/workflows/ci.yml → .github/workflows/QA.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
name: CI
name: QA

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

jobs:
code-formating:
check-qa:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Retrieve source code
uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r api/requirements.txt
- name: black code formatting check
run: |
pip install -U "black==22.3.0"
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/docker.yml

This file was deleted.

0 comments on commit ec36519

Please sign in to comment.