Skip to content

ci

ci #1

Workflow file for this run

name: ci
on: workflow_dispatch
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: set lower case owner name
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: '${{ github.repository_owner }}'
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ env.OWNER_LC }}
password: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/pgstosrt:latest
${{ secrets.DOCKERHUB_USERNAME }}/pgstosrt:${{ github.ref_name }}
ghcr.io/${{ env.OWNER_LC }}/pgstosrt:latest
ghcr.io/${{ env.OWNER_LC }}/pgstosrt:${{ github.ref_name }}