Skip to content

ci: push docker image to dockerhub and ghcr #8

ci: push docker image to dockerhub and ghcr

ci: push docker image to dockerhub and ghcr #8

Workflow file for this run

name: "⚒️ Deploy image to Dockerhub and GHCR"
on:
push:
branches:
- main
tags:
- "*"
workflow_dispatch:
jobs:
push-store-image:
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub Action
uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install poetry
uses: snok/install-poetry@v1
with:
version: 1.8.3
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: ~/.venv
installer-parallel: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
# - name: Build Inventory Image
# run: |
# docker build . --tag ghcr.io/geotribu/gischat:$(poetry version -s) --tag ghcr.io/geotribu/gischat:latest
# docker push ghcr.io/geotribu/gischat:$(poetry version -s)
# docker push ghcr.io/geotribu/gischat:latest
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: |
gounux/gischat:latest
gounux/gischat:$(poetry version -s)
ghcr.io/geotribu/gischat:latest
ghcr.io/geotribu/gischat:$(poetry version -s)