2023-12-06 15:20:53 +01:00
|
|
|
name: Publish SQLx container
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-12-06 15:21:28 +01:00
|
|
|
- "main"
|
2023-12-06 15:30:16 +01:00
|
|
|
paths:
|
2023-12-06 15:31:22 +01:00
|
|
|
- "sqlx/"
|
2023-12-06 15:46:02 +01:00
|
|
|
- ".github/workflows/sqlx.yml"
|
2023-12-06 15:20:53 +01:00
|
|
|
|
|
|
|
env:
|
|
|
|
IMAGE: tools-sqlx
|
2023-12-06 15:46:02 +01:00
|
|
|
VERSION: 0.7.3
|
2023-12-06 15:20:53 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Log into Registry
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ${{ vars.REGISTRY }}
|
|
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
|
|
|
|
- name: Extract Metadata
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
with:
|
2023-12-06 15:30:16 +01:00
|
|
|
images: ${{ vars.REGISTRY }}/${{ secrets.REGISTRY_USER }}/${{ env.IMAGE }}
|
2023-12-06 15:20:53 +01:00
|
|
|
labels: |
|
|
|
|
org.opencontainers.image.title=SQLx
|
|
|
|
org.opencontainers.image.description=SQLx in a container
|
2023-12-06 15:46:02 +01:00
|
|
|
org.opencontainers.image.version=${{ env.VERSION }}
|
|
|
|
tags: |
|
|
|
|
type=semver,pattern={{version}},value=v${{ env.VERSION }}
|
|
|
|
type=semver,pattern={{major}}.{{minor}},value=v${{ env.VERSION }}
|
|
|
|
type=semver,pattern={{major}}=v${{ env.VERSION }}
|
|
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
2023-12-06 15:20:53 +01:00
|
|
|
|
|
|
|
- name: Build and Push
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
with:
|
2023-12-06 15:22:57 +01:00
|
|
|
context: ./sqlx
|
2023-12-06 15:20:53 +01:00
|
|
|
push: true
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
2023-12-06 15:46:02 +01:00
|
|
|
|