Skip to content

Commit

Permalink
publish docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
SnO2WMaN committed Dec 19, 2023
1 parent 1304610 commit 109014f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Docker Image

on:
push:
branches:
- main
pull_request:
merge_group:

jobs:
docker_image:
name: Docker Image (Postgres Migration)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
- uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3
- uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: echo "LATEST_MIGRATION_NAME=$(ls -1 --ignore migration_lock.toml ./migrations --reverse | head -n 1)" >> $GITHUB_ENV
- uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ github.event_name == 'push' }}
tags: ghcr.io/${{ github.repository_owner }}/postgres-migration:${{ env.LATEST_MIGRATION_NAME }}

0 comments on commit 109014f

Please sign in to comment.