ci-docker #5
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: ci-docker | |
on: | |
# our dockerfile is not optimized at all for caching and takes ages | |
# so for now we are going to only dispatch it manually | |
# push: | |
# branches: | |
# - main | |
workflow_dispatch: | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Pull latest images | |
run: | | |
docker pull georgebott/postgres_web3:latest | |
docker pull georgebott/postgres_web3:alpine | |
docker pull georgebott/postgres_web3:15-alpine | |
docker pull georgebott/postgres_web3:15.2-alpine | |
docker pull ghcr.io/yen/postgres_web3:latest | |
docker pull ghcr.io/yen/postgres_web3:alpine | |
docker pull ghcr.io/yen/postgres_web3:15-alpine | |
docker pull ghcr.io/yen/postgres_web3:15.2-alpine | |
- | |
name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
platforms: linux/386,linux/amd64,linux/arm64 | |
tags: | | |
georgebott/postgres_web3:latest | |
georgebott/postgres_web3:alpine | |
georgebott/postgres_web3:15-alpine | |
georgebott/postgres_web3:15.2-alpine | |
ghcr.io/yen/postgres_web3:latest | |
ghcr.io/yen/postgres_web3:alpine | |
ghcr.io/yen/postgres_web3:15-alpine | |
ghcr.io/yen/postgres_web3:15.2-alpine | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |