Skip to content

Update docker/build-push-action action to v6 #11

Update docker/build-push-action action to v6

Update docker/build-push-action action to v6 #11

Workflow file for this run

name: Docker
on:
push:
branches: [ "main", "dev" ]
tags: [ 'v*.*.*' ]
pull_request:
branches: ["dev"]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: divideprojects/poetry-export-requirements-action@v1
with:
without-hashes: false
outfile-name: requirements.txt
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata for
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=sha
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max