39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
name: Ascently - Sync Deploy
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "sync/**"
|
|
- ".github/workflows/deploy.yml"
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ${{ secrets.REPO_HOST }}
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.DEPLOY_TOKEN }}
|
|
|
|
- name: Build and push sync-server
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./sync
|
|
file: ./sync/Dockerfile
|
|
platforms: linux/amd64
|
|
push: true
|
|
tags: |
|
|
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/ascently-sync:${{ github.sha }}
|
|
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/ascently-sync:latest
|