Merge pull request #207 from thedatabaseme/renovate/louislam-uptime-k… #676
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build psql-client image | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "v*-psql-client" | |
pull_request: | |
branches: | |
- 'master' | |
jobs: | |
build-docker-psql-client: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ghcr.io/thedatabaseme/psql-client | |
flavor: latest=true | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern=v{{major}}.{{minor}}.{{patch}} | |
- name: Login to image repository | |
if: github.ref_type == 'tag' | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: docker/dockerfile/psql-client/Dockerfile | |
push: ${{ github.ref_type == 'tag' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |