Skip to content

Use a pool instead of a single connection to DB #4

Use a pool instead of a single connection to DB

Use a pool instead of a single connection to DB #4

name: Publish Docker Image
on:
push:
branches:
- master
jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Generate release tag
id: generate_release_tag
uses: alexvingg/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: ''
- name: Convert repo name to lowercase
run: echo "REPO_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 'Build and Push Docker Image'
run: |
docker build . --tag ghcr.io/${{ env.REPO_NAME }}:latest --tag ghcr.io/${{ env.REPO_NAME }}:${{ steps.generate_release_tag.outputs.release_tag }}
docker push ghcr.io/${{ env.REPO_NAME }}:latest
docker push ghcr.io/${{ env.REPO_NAME }}:${{ steps.generate_release_tag.outputs.release_tag }}