Skip to content

simplify GREATLY the docker deployment #3

simplify GREATLY the docker deployment

simplify GREATLY the docker deployment #3

Workflow file for this run

name: CI - Build and Deploy
on:
push:
branches:
- main
- devops/move-circleci-to-gha
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Store image tag
id: image_tag
run: echo "IMAGE_TAG=$(echo `git log -n1 --format='%h'`)" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Build and Push django image
run: |
source $GITHUB_ENV
docker build -t ldssa/django:$IMAGE_TAG .
docker push ldssa/django:$IMAGE_TAG