Skip to content

Commit

Permalink
Add GHA workflow to publish db-sync image
Browse files Browse the repository at this point in the history
  • Loading branch information
botimer committed May 29, 2024
1 parent dfa3bdb commit 59c3b45
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build-sync-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Build Lauth database sync
#description: Builds an image to synchronize databases

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v4

- name: Build image and push to GitHub Container Registry
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: 'ghcr.io/mlibrary/lauth/db-sync:${{ github.sha }}, ghcr.io/mlibrary/lauth/db-sync:latest'
file: db/sync/Dockerfile
platforms: linux/amd64, linux/arm64

- name: Image digest
run: |
echo '${{ steps.docker_build.outputs.digest }}'

0 comments on commit 59c3b45

Please sign in to comment.