Added proper CI
All checks were successful
OpenClimb Docker Deploy / build-and-push (pull_request) Successful in 2m3s
All checks were successful
OpenClimb Docker Deploy / build-and-push (pull_request) Successful in 2m3s
This commit is contained in:
43
.github/workflows/deploy.yml
vendored
Normal file
43
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: OpenClimb Docker Deploy
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "sync/**"
|
||||
- ".github/workflows/deploy.yml"
|
||||
pull_request:
|
||||
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@v3
|
||||
|
||||
- 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@v4
|
||||
with:
|
||||
context: ./sync
|
||||
file: ./sync/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/openclimb-sync-server:${{ github.sha }}
|
||||
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/openclimb-sync-server:latest
|
||||
Reference in New Issue
Block a user