Skip to content

Update dockerfile to build libgdiplus from Source #35

Update dockerfile to build libgdiplus from Source

Update dockerfile to build libgdiplus from Source #35

Workflow file for this run

name: Deploy to Server
on:
push:
paths-ignore:
- 'README.md'
- 'LICENCE'
- '.gitignore'
- '.githooks/'
- 'tests/**'
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Modify Dockerfile to be deployed using ARM architeture
run: |
sed -i 's|FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build|FROM arm64/mcr.microsoft.com/dotnet/sdk:8.0 AS build|g' Dockerfile
sed -i 's|FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-alpine AS run|FROM arm64/mcr.microsoft.com/dotnet/sdk:8.0 AS run|g' Dockerfile
shell: bash
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
shell: bash
- name: Deploy to Server
env:
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USER: ${{ secrets.SSH_USER }}
SSH_PORT: ${{ secrets.SSH_PORT }}
run: |
ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "mkdir -p /home/$SSH_USER/apps/avatarize-api"
scp -P $SSH_PORT -r ./* $SSH_USER@$SSH_HOST:/home/$SSH_USER/apps/avatarize-api
ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "
cd /home/$SSH_USER/apps/avatarize-api &&
sudo docker compose down &&
sudo docker compose build &&
sudo docker compose up -d
"
shell: bash