Skip to content

Commit

Permalink
add action
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Caha committed Sep 6, 2024
1 parent 0dbaeee commit 9209e5d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build_docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build Docker Image

on:
release:
types: [published, edited]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Get Version from Git Tag
id: version
run: |
echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
file: Dockerfile
context: .
push: true
tags: "lutraconsulting/mergin-db-sync:${{steps.version.outputs.VERSION}},lutraconsulting/mergin-db-sync:latest"

0 comments on commit 9209e5d

Please sign in to comment.