Skip to content

fix CI for hasadna deployment #10

fix CI for hasadna deployment

fix CI for hasadna deployment #10

Workflow file for this run

name: Server CI
env:
IMAGE: ghcr.io/hasadna/meirim/meirim-server
on:
push:
paths:
- server/**
- .github/workflows/server.yml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
- id: docker_build
uses: docker/build-push-action@v6
with:
push: true
tags: |
${{ env.IMAGE }}:${{ github.sha }}
${{ github.ref == 'refs/heads/master' && format('{0}:latest', env.IMAGE) || '' }}
context: "{{defaultContext}}:server"
cache-from: type=registry,ref=${{ env.IMAGE }}:buildcache-latest
cache-to: ${{ github.ref == 'refs/heads/master' && format('type=registry,ref={0}:buildcache-latest,mode=max', env.IMAGE) || '' }}
- if: github.ref == 'refs/heads/master'
uses: hasadna/hasadna-k8s/.github/actions/deploy@master
with:
app: meirim
updates: serverImage=${{ env.IMAGE }}:${{ github.sha }}
env:
HASADNA_K8S_DEPLOY_KEY: ${{ secrets.HASADNA_K8S_DEPLOY_KEY }}