Skip to content

Workflow file for this run

name: "Build and push docker image"
on:
push:
branches:
- '*'
env:
IMAGE: "teltek/php-cs-fixer-ga"
PLATFORMS: linux/amd64
jobs:
build:
name: 'Build and Push'
runs-on: "ubuntu-latest"
steps:
- name: Login to Dockerhub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/[email protected]
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
- name: Build and push images
uses: docker/build-push-action@v4
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
tags: |
${{env.IMAGE}}:latest
file: Dockerfile
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: ${{ env.PLATFORMS }}