Skip to content

Test master branch 11 #201

Test master branch 11

Test master branch 11 #201

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ github-actions-optimisation ]
workflow_dispatch:
env:
DOCKER_IMAGE_REPO: bandirom/django-template
jobs:
# tests:
# uses: ./.github/workflows/tests.yml
# secrets: inherit
push:
runs-on: ubuntu-latest
# needs: [tests]
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_IMAGE_REPO }}
tags: |
type=sha,format=short,prefix=
- name: Build and push
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name != 'pull_request' }}
context: .
tags: |
${{ steps.meta.outputs.tags }}
${{ env.DOCKER_IMAGE_REPO }}:latest
labels: ${{ steps.meta.outputs.labels }}
file: docker/prod/web/Dockerfile
cache-from: type=registry,ref=${{ env.DOCKER_IMAGE_REPO }}:latest
cache-to: type=inline
# load: true