Skip to content

version: v1.2.1

version: v1.2.1 #21

Workflow file for this run

name: "⚒️ Deploy image to Dockerhub and GHCR"
on:
push:
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: 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 and push image
run: |
docker build . \
--tag gounux/gischat:$(poetry version -s) \
--tag gounux/gischat:latest \
--tag ghcr.io/geotribu/gischat:$(poetry version -s) \
--tag ghcr.io/geotribu/gischat:latest
docker push gounux/gischat:$(poetry version -s)
docker push gounux/gischat:latest
docker push ghcr.io/geotribu/gischat:$(poetry version -s)
docker push ghcr.io/geotribu/gischat:latest