-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan Caha
committed
Sep 6, 2024
1 parent
0dbaeee
commit 9209e5d
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
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
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" | ||
|