Skip to content

Commit 729648d

Browse files
committed
new action
1 parent 2ead57e commit 729648d

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/build_docker.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build Docker Image
2+
3+
on:
4+
release:
5+
types: [published, edited]
6+
7+
jobs:
8+
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Log in to Docker Hub
17+
uses: docker/login-action@v3
18+
with:
19+
username: ${{ secrets.DOCKER_USERNAME }}
20+
password: ${{ secrets.DOCKER_PASSWORD }}
21+
22+
- name: Get Version from Git Tag
23+
id: version
24+
run: |
25+
echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
26+
echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
27+
28+
- name: Build and push Docker image
29+
uses: docker/build-push-action@v6
30+
with:
31+
file: Dockerfile
32+
context: .
33+
push: true
34+
tags: "lutraconsulting/mergin-db-sync:${{steps.version.outputs.VERSION}},lutraconsulting/mergin-db-sync:latest"
35+

0 commit comments

Comments
 (0)