Skip to content

Remove hard hosts

Remove hard hosts #20

name: Build Postgres Sandbox Docker Image
on:
push:
tags:
- 'v*.*.*'
jobs:
build-docker:
runs-on: ubuntu-latest
env:
IMAGE_USERNAME: codiew
IMAGE_NAME: codiew/codenire-sandbox_db
WORKDIR: ./sandbox_db/pg
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Docker meta
id: docker_meta
uses: docker/[email protected]
with:
images: |
${{ env.IMAGE_NAME }}
tags: |
latest
type=sha
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
- name: Set up Docker Buildx
id: buildx
uses: docker/[email protected]
with:
install: true
- name: Log in to Docker Hub
uses: docker/[email protected]
with:
username: ${{ env.IMAGE_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
id: build
uses: docker/build-push-action@v6
with:
context: ${{ env.WORKDIR}}
push: true
builder: ${{ steps.buildx.outputs.name }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha
build-args: |
GIT_VERSION=${{ env.GIT_VERSION }}
GIT_COMMIT=${{ github.sha }}
# platforms: linux/amd64,linux/arm64/v8
platforms: linux/amd64