Skip to content

Commit 6756e5a

Browse files
authored
Create dropback-docker-publish.yml
1 parent 4ed05f4 commit 6756e5a

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish Dropback Docker Container
2+
3+
on:
4+
push:
5+
branches: ['master']
6+
7+
jobs:
8+
build_and_publish_platform_containers:
9+
name: Build and publish platform containers
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-tags: true
18+
19+
- name: Login to DockerHub
20+
uses: docker/login-action@v3
21+
with:
22+
username: ${{ secrets.DOCKERHUB_USERNAME }}
23+
password: ${{ secrets.DOCKERHUB_TOKEN }}
24+
25+
- name: Build the docker image
26+
env:
27+
BUILD_PLATFORM: amd64
28+
run: |
29+
APP_VERSION="$(git name-rev --tags --name-only $(git rev-parse HEAD) | head -n 1 | sed 's/\^0//')"
30+
GIT_SHA="$(git rev-parse HEAD)"
31+
32+
docker build \
33+
-f ./Dockerfile \
34+
--progress=plain \
35+
-t "dropbackhq/superset-dropback-$BUILD_PLATFORM:latest" \
36+
-t "dropbackhq/superset-dropback-$BUILD_PLATFORM:$GIT_SHA" \
37+
-t "dropbackhq/superset-dropback-$BUILD_PLATFORM:$APP_VERSION" \
38+
.
39+
40+
- name: Push the docker image to DockerHub
41+
run: docker push "dropbackhq/superset-dropback-$BUILD_PLATFORM:latest"
42+
env:
43+
BUILD_PLATFORM: amd64

0 commit comments

Comments
 (0)