Skip to content

Commit 33b0ad7

Browse files
committed
Add postgres sandbox
1 parent f91872e commit 33b0ad7

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build Postgres Sandbox Docker Image
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
build-docker:
10+
runs-on: ubuntu-latest
11+
env:
12+
IMAGE_USERNAME: codiew
13+
IMAGE_NAME: codiew/codenire-sandbox_db
14+
WORKDIR: ./sandbox_db
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Docker meta
20+
id: docker_meta
21+
uses: docker/[email protected]
22+
with:
23+
images: |
24+
${{ env.IMAGE_NAME }}
25+
tags: |
26+
latest
27+
type=sha
28+
type=semver,pattern=v{{version}}
29+
type=semver,pattern=v{{major}}.{{minor}}
30+
type=semver,pattern=v{{major}}
31+
32+
- name: Set up Docker Buildx
33+
id: buildx
34+
uses: docker/[email protected]
35+
with:
36+
install: true
37+
38+
- name: Log in to Docker Hub
39+
uses: docker/[email protected]
40+
with:
41+
username: ${{ env.IMAGE_USERNAME }}
42+
password: ${{ secrets.DOCKER_PASSWORD }}
43+
44+
- name: Build and push
45+
id: build
46+
uses: docker/build-push-action@v6
47+
with:
48+
context: ${{ env.WORKDIR}}
49+
push: true
50+
builder: ${{ steps.buildx.outputs.name }}
51+
tags: ${{ steps.docker_meta.outputs.tags }}
52+
labels: ${{ steps.docker_meta.outputs.labels }}
53+
cache-from: type=gha
54+
cache-to: type=gha
55+
build-args: |
56+
GIT_VERSION=${{ env.GIT_VERSION }}
57+
GIT_COMMIT=${{ github.sha }}
58+
# platforms: linux/amd64,linux/arm64/v8
59+
platforms: linux/amd64

0 commit comments

Comments
 (0)