Skip to content

Merge pull request #414 from fujaba/fix/remove-mockups #3

Merge pull request #414 from fujaba/fix/remove-mockups

Merge pull request #414 from fujaba/fix/remove-mockups #3

name: Deploy Projects
on:
push:
branches:
- master
paths:
- 'projects/**'
- '.github/workflows/deploy.sh'
- '.github/workflows/deploy-projects.yml'
concurrency:
group: deploy-projects
cancel-in-progress: true
jobs:
projects-images:
name: Projects Images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker
uses: docker/login-action@v2
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push base
uses: docker/bake-action@v3
with:
push: true
workdir: projects/
files: docker-compose.base.yaml
set: |
*.cache-to=type=gha,mode=max
*.cache-from=type=gha
- name: Build and push techs
uses: docker/bake-action@v3
with:
push: true
workdir: projects/
files: docker-compose.techs.yaml
set: |
*.cache-to=type=gha,mode=max
*.cache-from=type=gha
projects-proxy:
name: Projects Proxy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build the Projects Proxy Docker Image
uses: whoan/docker-build-with-cache-action@v6
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ${{ secrets.DOCKER_REGISTRY }}
image_name: fulib/fulib.org-projects-proxy
context: projects/
dockerfile: proxy/Dockerfile
projects-runtime:
name: Projects Runtime
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build the Projects Runtime Docker Image
uses: whoan/docker-build-with-cache-action@v6
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ${{ secrets.DOCKER_REGISTRY }}
image_name: fulib/fulib.org-projects-runtime
context: projects/
dockerfile: runtime/Dockerfile
projects-deploy:
name: Projects Deployment
runs-on: ubuntu-latest
needs: [ projects-images, projects-proxy, projects-runtime ]
steps:
- name: Deploy the Projects Runtime to Rancher
uses: sekassel-research/actions-rancher-update@v3.0.0
with:
rancher_url: ${{ secrets.RANCHER_URL }}
rancher_token: ${{ secrets.RANCHER_TOKEN }}
cluster_id: ${{ secrets.RANCHER_CLUSTER }}
project_id: ${{ secrets.RANCHER_PROJECT }}
namespace: ${{ secrets.NAMESPACE }}
deployment: fulib-projects-runtime
docker_image: ${{ secrets.DOCKER_REGISTRY }}/fulib/fulib.org-projects-runtime