Skip to content

ci(fix): lowercase

ci(fix): lowercase #41

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: docker build -t ghcr.io/sn0wye/caho-api:$GITHUB_SHA .
- name: Tag Docker image (SHA Tag)
run: docker tag ghcr.io/sn0wye/caho-api:$GITHUB_SHA ghcr.io/sn0wye/caho-api:$GITHUB_SHA
- name: Tag Docker image (Latest Tag)
run: docker tag ghcr.io/sn0wye/caho-api:$GITHUB_SHA ghcr.io/sn0wye/caho-api:latest
- name: Push Docker image to GitHub Container Registry (SHA Tag)
run: docker push ghcr.io/sn0wye/caho-api:$GITHUB_SHA
- name: Push Docker image to GitHub Container Registry (Latest Tag)
run: docker push ghcr.io/sn0wye/caho-api:latest
- name: SSH and Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
passphrase: ${{ secrets.SERVER_PASSPHRASE }}
script: |
./caho/scripts/deploy.sh caho-api $GITHUB_SHA ghcr.io/sn0wye/caho-api