fixup! Improved restore/sync logging #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy | |
on: | |
push: | |
env: | |
CI_REGISTRY_IMAGE: "${{ secrets.CI_REGISTRY }}/litestream" | |
jobs: | |
build-docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ secrets.CI_REGISTRY }} | |
username: ${{ secrets.CI_REGISTRY_USER }} | |
password: ${{ secrets.CI_REGISTRY_PASSWORD }} | |
- name: Docker Build | |
uses: docker/build-push-action@v2 | |
with: | |
cache-from: ${{ env.CI_REGISTRY_IMAGE }}:latest | |
pull: true | |
file: Dockerfile | |
build-args: LITESTREAM_VERSION=${{ github.sha }} | |
tags: ${{ env.CI_REGISTRY_IMAGE }}:${{ github.sha }} | |
push: true | |
deploy-docker: | |
runs-on: ubuntu-latest | |
needs: | |
- build-docker | |
if: github.ref == 'refs/heads/beeper' | |
steps: | |
- name: Login to registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ secrets.CI_REGISTRY }} | |
username: ${{ secrets.CI_REGISTRY_USER }} | |
password: ${{ secrets.CI_REGISTRY_PASSWORD }} | |
- uses: beeper/docker-retag-push-latest@main | |
with: | |
image: ${{ env.CI_REGISTRY_IMAGE }} |